WIP
This commit is contained in:
parent
d3b5dbe322
commit
1320473e9d
2 changed files with 8 additions and 4 deletions
6
VRPN.gd
6
VRPN.gd
|
@ -1,8 +1,7 @@
|
|||
extends Node
|
||||
|
||||
class_name VRPN
|
||||
|
||||
enum { POS_QUAT }
|
||||
enum TrackingData { POS_QUAT, VELOCITY }
|
||||
|
||||
const magic_cookie_start : String = "vrpn: ver."
|
||||
|
||||
|
@ -12,6 +11,7 @@ class Session:
|
|||
func _init():
|
||||
pass
|
||||
|
||||
@export
|
||||
|
||||
static func marshall_block(data : PackedByteArray,session : Session) -> void:
|
||||
|
||||
|
@ -91,7 +91,7 @@ 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)
|
||||
print("Tracker:{0} Sensor:{1} Pos:{2} Quat:{3}".format([session.sensors[sender_id],sensor_id,pos,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]))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue