#Behavior + Netcode for Gameobjects

1 messages · Page 1 of 1 (latest)

turbid phoenix
#

Hello!

I am creating a collaborative assembling experience in VR (think of it as assembling a car together) and I am using the Behavior package to handle the state of the current step you are on in the car assembling.
When I assemble two pieces that are in the current step it would go to the next step in the Behavior tree.

My issue comes that when one player does the step the other player's behavior tree is not aware of the changes.
Is there a nice way to make sure that these behavior trees are synced?

Thanks in advance!

broken vigil
#

It been a minute since I last looked at the behavior package but I'm pretty sure by default behavior trees should only be running on the server/host. You can use network variables if you need to sync data from the agent

turbid phoenix
#

hmm, maybe it would be better indeed to just have the agent on the server and that the action events get RPC'd to the server so that it can update the graph

#

If there was a way to jump to a node with a simple ID in the Behavior tree then I could've RPC'd an updated index across the clients to sync their current step

broken vigil
#

you can make custom nodes. It should be easy enough to make a GoTo Node

turbid phoenix
#

Ah yeah, I haven't even thought about that

#

I'll see if I can get a GoTo node working