Prefab with multiple bolt entities

Balzaque
Balzaque
edited October 2015 in Photon Bolt
Hi, my player is structured as follow:

Parent - empty game object to group everything, this is the root of the prefab
--- Player - BoltEntity that manages player movement and all other behaviors the player need to do
--- Weapon - BoltEntity that manages movement and everything else related to how the weapon works, this is one spike that the player needs to throw around and grab it to shoot again so we made it permanent and not something that we instantiate whenever the player wants to shoot it.

On my understanding I made the parent to also be a BoltEntity to make sure instantiating over the network would work, the problem is that neither the player or the weapon get attached to the engine and I'm not sure how to proceed, do I need to manually attach then? How do I do that manually?

Thanks!

small update: trying to call BoltNetwork.Attach on each BoltEntity inside the prefab works on the server but for some reason force the clients to disconnect.

Comments

  • Last time I checked you had to instantiate them separately and then do the parenting at runtime.

    This search in the jabbr chat should help you: http://boltchat.aursand.no/?q=parent
  • Thanks, that worked!
  • DigitalDNA
    edited September 2016
    I am curious about this myself, but that link in dead. Can anyone tell me how this would work?

    To be more specific I have a scenario where I have a tank and one player moves the tank and the other controls the movement of the gun. I am curious to how this scenario would be handled.