Fast spinning object that MUST be accurate at time of impact with another object...

I think I may have worked myself into a corner here, and completely understand if what I'm about to ask just isn't possible due to the nature of networked games (this is my first attempt at it, so I'm still on the steep part of the learning curve).

I have a game that involves a ball that bounces toward a spinning object and eventually collides with it, sending the ball back towards the goal. I've been able to perfectly synchronize the ball on the way to the spinner, but what I've found is that I can't get the spinners to synchronize, which causes that ball to strike the spinner in a different place on the remote machine and completely change the outcome of the turn... not good, right? :)

I've toyed around with everything I can think of, but I think that because the spinner is rotating so quickly, I may not be able to synchronize it. So here's my question:

1) Am I missing something? Is there a way to accomplish this that I just don't know about?
2) If not, does anybody have any advice as to how I can handle this issue and make the playing experience satisfying while maintaining the integrity of each turn? It feels to me like not being able to see the other player's spinner move will detract from the game play, but I'm willing to be creative in figuring out a way to make it work.

Thanks for any ideas you might be able to offer. I appreciate it.


  • TobiasTobias admin
    This is likely not easy to do without cheating or running the simulation in a deterministic way (which Unity can't do out of the box).
    By cheating I mean: Calculate the hit on one machine and send the result to the others.
    As Unity is not deterministic, the results may vary per platform, despite using the same force and direction as one client calculated, so the ball may end up on various places.

    So .. you could also calculate the trajectory and final resting place for the ball and send all of that. Then, any client can interpolate towards that result.
Sign In or Register to comment.