- Home /
Rigidbody Issue on spawn (Unity Networking)
Hi,
I'm making a small game for me and my friends but I have an issue when the network manager spawn the player.
The player has a rigidbody based controller.
And when he spawns, some unknow rotation forces apply on the player and I don't know where they are comming from.
I checked every scripts where I apply forces and rotation but nothing solve my problem.
For the movement I use 'rigidbody.AddForce' and for the rotation I use 'transform.Rotate'. I tried to replace 'transform.Rotate' by 'rigidbody.MoveRotation' but I have the same issue.
Can someone help me ?
Thanks
Answer by xyHeat · Jun 27, 2018 at 09:17 AM
I found the solution : i changed the center of mass.
Bye
Answer by tormentoarmagedoom · Jun 26, 2018 at 08:19 AM
Good day.
Does the object have a Navmesh agent?
There ases any collision interacting?
Is the object or the parents receiveng orders or impacts or collisions from other object/script?
I just found out that all clients are rotating on the global Z axe
Aha!
So you have the answer! nice!
Please kidnly accept the answer :D
Bye!
But I don't know why, I restared my project and I'll give a answer
No one has a Nav$$anonymous$$esh agent but there are some empty childs objects with colliders under the player
I disabled every scripts that apply forces on them but it didn't work
EDIT : I tried to put only one box collider but it also didn't solve the issue. When there is no collider, there is no issue, but there is no collider
Your answer
![](https://koobas.hobune.stream/wayback/20220612165507im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Networked Physics 0 Answers
Unity networking tutorial? 6 Answers
How do I change networkView ownership of a Rigidbody by clicking on it? 1 Answer
Can't Spawn Rigidbody over network with NetworkServer.Spawn(); 1 Answer
How to sync a ball, where two players kick it in turns? (Multiplayer game using UNET) 0 Answers