- Home /
Photon Syncing rotating projectile 2D
Greetings, I have a projectile that actually consist of 3 colliders with a single parent rigidbody. The rigidbody has an angular velocity, when one of the triggers collide, the object with that trigger explodes and gets destroyed.
Now, the problem here is that, on some clients, some clients will see all the projectiles explode and some will only see 1 explode or 2 of them explode whilst the remaining projectile still follows through. So what's the best option for doing this?
Cheers in advance
I remember helping on this topic, but it wasn't here. Henry, maybe you can post any solution you found?
Yo Tobias, I placed a PhotonView component on each collider gameobject and the parent gameobject. I made a variable in the parent gameobject called "ChildCount" and set it to 3. When it collides, it sends an RPC to disable the collider, the renderer then ChildCount-- in the parent. In the Parent gameobject, when the childcount is 0, it gets destroyed. I managed to test this in a 3 player game just now, and it seemed to work without issues. Cheers for your help previously Tobias. Reference link will be in the answer
Answer by HenryTheChief · Jul 22, 2015 at 06:40 AM
I posted a brief of my solution in here: http://forum.photonengine.com/discussion/6260/syncing-rotating-multiple-projectiles