[UNET] How do I allow clients to move a GameObject that exists on the server?
I started to delve into the UNet system for the first time the other day and I've run into a bit of an issue while testing on a localhost server. In the scene there is a Rigidbody ball that I want every player to be able to pick up and move around. So on each player there is a script where every time they right click, a raycast is sent out, and if it hits the ball (which is a rigidbody itself), then a [Command] is sent to run a method on the ball called RequestNewHandler(), what this does is check to see if the ball is currently being held by someone, and if not, it attaches itself to the player object that issued the [Command]. So far the script works very well... if you are the localhost. I can't seem to get any clients to be able to pick up the ball.
Your answer
Follow this Question
Related Questions
Spawning Network Objects from the client | Unity Netcode For Gameobjects 0 Answers
non-player object can't execute's "[Command]"'s attributes 0 Answers
Calling Bool in Network Command Not Working 0 Answers
UNet Sharing Gameobjects between multiple clients 0 Answers
SyncVar works not always 0 Answers