- Home /
Rigidbody rotate around
From my understanding, it's best to use forces to move rigidbodies so I was wondering Is there some way to using forces to have one rigidbody rotate around another?
I am on my mobile device but I believe that AddTorque dose the job. Sorry I have no easy way off checking.
Answer by Chris D · Apr 19, 2011 at 08:21 PM
If you want to do it with forces, connect the two rigidbodies with a joint: http://unity3d.com/support/documentation/ScriptReference/Joint.html
And then add a force to the rigidbody you want to get moving: http://unity3d.com/support/documentation/ScriptReference/Rigidbody.AddForce.html
There's lots of customization to be had and should provide what you're looking for.
EDIT:
Alternatively, I've used Transform.RotateAround with success in the past, but that's directly accessing the transforms and not leaving it to physics.
Answer by burgunfaust · Apr 20, 2011 at 11:37 AM
Are you talking about an orbit around kind of thing? There is a script in the wiki that has an orbit around.
Your answer
![](https://koobas.hobune.stream/wayback/20220613123854im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Add Force without Rotation 2 Answers
Adding more forces vs adding sum of forces 2 Answers
Raycast push? How? 1 Answer
Reading the forces applied on a freezed rigidbody(solved) 1 Answer