- Home /
Using uNet to spawn a player prefab, but the rotation of the prefab is off
Depending on what Network Starting Position I use, the player prefab is spawned with different rotations.
So in my scene I have 4 starting positions. 2 of them work correctly - if I have these 2 enabled and start the scene and connect two clients, then they are both oriented correctly on both computers.
However, if I use the other two and start the scene, then on the host computer both players are oriented correctly, but on the client computer the host's prefab is facing the wrong way. And remains facing the opposite direction he should be facing as I move him around the scene.
Comment
Answer by 13SUNNY · Feb 13, 2017 at 02:06 PM
Create an empty GameObject using the GameObject->Create Empty menu
Position the new GameObject so that it is at the center of your mesh or whichever point you want your object to rotate around.
Drag the mesh onto the empty GameObject