MVP using pos/quat

This commit is contained in:
Hartmut Seichter 2025-07-02 13:01:47 +02:00
parent 2a701c0ac7
commit 63230b7754
3 changed files with 16 additions and 18 deletions

View file

@ -177,6 +177,8 @@ static func marshall_body(data : PackedByteArray,message_type : int, sender_id:
var quat_y = body.get_double()
var quat_z = body.get_double()
#var quat = Quaternion(quat_x,quat_y,quat_z,quat_w).normalized()
# bug? Documentation of Godot Quaternion c'tor is x,y,x,w
# but implementation follow classic w,x,y,z order
var quat = Quaternion(quat_w,quat_x,quat_y,quat_z).normalized()
for r in session.tracker_receivers:
@ -186,8 +188,6 @@ static func marshall_body(data : PackedByteArray,message_type : int, sender_id:
"position" : pos,
"rotation" : quat
})
#print("Sender:{0} Sensor:{1} Pos:{2} Quat:{3}".format([session.sensors[sender_id],sensor_id,pos,quat]))
_:
pass
#print("unhandled message type {0}".format([message_type]))