Ownership Transfer For Vehicle Enter/Exit

Options
Hello Developers

i am in my project of fps games, so in my game i can enter and exit any vehicle, i have the coded vehicle and can controlled (this not the problem)

so the problem is where i must enter and exit vehicle in network game, where the owner is the stream sender. in case my vehicle is owned by scene by default (started game) when i enter the vehicle then i take the ownership from scene to mine, so now i can enable the controller script and the .isMine can write or sendNext the position or another data to the network player. (i know how to request ownership) but the problem is where i need to exit the vehicle, i need to change the owner from mine to scene again, so i can stop enabling the controller script and the vehicle physic is handled by MasterClient again.

do you have any idea about this (enter-exit vehicle)?

i really stuck for about three days in this parts.

Thank's,
Endrik Prasetyo

Comments

  • up
  • Tobias
    Options
    You could TransferOwnership(int newOwnerId). Is this not working for your case?
  • yeah i now transfer photonView Mine to Scene by TransferOwnership(0), and that's working really fine.