Affecting objects without being it's owner

Hello there!

I'm a Unity developer and a couple of days ago I decided to look into Photon Networking. So far I quite like what I see, good job!

Now as my topic mentions I want to interact with objects without being it's owner. If I could sort out the following simple example it would provide me with the know-how to do pretty much everything I want to at the moment.

Plain and simple: I want to create physics-affected spheres which can be pushed around by all players.
When a player collides with a sphere, the sphere rolls away with the given force, even if the player is not the owner of the sphere. If a sphere bumps into another sphere, they act as physical spheres should act. The sphere's position and rotation should be synced for all players.
Having the sphere in the scene from the start won't give me the knowledge I need, the sphere has to be created in run-time.

Since I'm not very familiar with Photon Network yet I might be missing some obvious solution. I've had some thoughts about using the master-player to run the actual instantiation/physics and then simply send the master's positions to all other players. This does however not seem very practical when other players than the master bumps into a sphere.


All help is appreciated, but I would be extra grateful for code-examples.

Thank you for reading!
// Myx

Comments

  • Since I'm not very familiar with Photon Network yet I might be missing some obvious solution. I've had some thoughts about using the master-player to run the actual instantiation/physics and then simply send the master's positions to all other players. This does however not seem very practical when other players than the master bumps into a sphere.
    
    I would first give this setup a try. Even on the master client's scene the remote player will bump in to the object and push it around, its not like it won't be able to move it. Furthermore you could allow everyone to run local-physics on that object, as long as you smoothly lerp towards the "real" master client values (position/rotation/velocity/angular velocity).
Sign In or Register to comment.