Moving an object in multiplayer


I have got an enemy in my game that is able to walk around and to attack. Now I am trying to make my game multiplayer. I can connect clients to a server now, but at first every client saw the enemy on a different place. I have added a networkView and tried to update its position by means of a simple RPC. It works a little now, the clients can see the enemy at the same position but it moves very buggy now.

Does anyone know the solution for this? Any help is appreciated.

When sending things that change constantly such as movement you should probably tick the networkView to reliable and set it to observate the script where the positioning is handled.

Also you might wanna check this tutorial out:

This tutorial also shows some things you can do about the “buggy moving” that you’re talking about.

Let me know if this helps you.