2
\$\begingroup\$

I'm creating a billiard game where one white ball will be controlled by two online players.

I have set my object photonview to ownership takeover.

  1. When a player shoots the ball in one client, it is synced on other client.

  2. Now when I update the ball on the other client, the other client is not updated.

Why is the ownership fixed?

Only one client is sending the updates to the other client, and not vice versa.

What should I do here?

\$\endgroup\$
  • \$\begingroup\$ The link to the image you had put in the question has rotten. Perhaps you want to reupload it to stack's imgur account. \$\endgroup\$ – Vaillancourt Aug 7 '18 at 13:07
1
\$\begingroup\$

I can't say why the ownership is fixed.

But that being the case I'd suggest making two cue balls, one owned by each client.

Only make one visible at a time based on whose turn it is. Then after their turn, update the other ball with the exact resulting properties of the first. Swap their visibility, rinse, repeat.

Also, make sure to turn off all the physics of the invisible ball.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.