- Home /
NetworkView NPC's y values are wrong
I have mobs that are instantiated and controlled by the server, however they appear to be in the wrong position for the connected clients, their Y values are way too low (appearing under the map itself). I've tried using a periodic RPC to update their positions but it seems the NetworkView instantly puts them back in their old positions under the map.
I'm using GetComponent().Move(transform.forward*speed); to move them.
Anyone have any idea what the problem might be here?
Is a network view attached to each enemy game object ? Is the "GetComponent().$$anonymous$$ove(transform.forward*speed);" line in a RPC call and send to every client ?
Answer by CazicThule · Jan 22, 2013 at 12:11 PM
I fixed it, the problem was I was making them child objects of another gameobject. Apparently this confuses the networkview?
It does not confuses the network view. The network view has an input parameter that is monitored. Everything else is not synchronized threw network. So you can have a parent gameobject but all your enemy game objects that are children of it must have their own network view.
So you can still have this kind of herarchy to handle all your enemies :)