all pieces are there - now refactoring into something usable
This commit is contained in:
parent
de9a4990e5
commit
d3b5dbe322
3 changed files with 47 additions and 21 deletions
|
@ -5,12 +5,15 @@ signal data(data:Array)
|
|||
signal disconnected
|
||||
signal error
|
||||
|
||||
# Graphics Interaction Lab OptiTrack system @212.201.64.122
|
||||
|
||||
@onready var _stream: StreamPeerTCP = StreamPeerTCP.new()
|
||||
|
||||
@export var vrpn_server : String = "localhost"
|
||||
@export var vrpn_server : String = "127.0.0.1"
|
||||
@export var vrpn_port : int = 3883
|
||||
|
||||
var session : VRPN.Session = VRPN.Session.new()
|
||||
|
||||
func _ready() -> void:
|
||||
self.connect_to_host(vrpn_server,vrpn_port)
|
||||
|
||||
|
@ -67,7 +70,7 @@ func _on_data(data : Array):
|
|||
# kaboom we just send back the same cookie :)
|
||||
self.send(bytes)
|
||||
else:
|
||||
VRPN.marshall_block(bytes)
|
||||
VRPN.marshall_block(bytes,session)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue