- Home /
Best way to move a rigidbody
I have 2D game with nodes that a rigidbody has to follow. I figured I can check if the next target is to the left or to the right and the move the rigidbody accordingly. I do want to use physics, as I want the rigidbody to fall of ledges realistically. What is the best (In regards to performance) way to move a rigidbody?
Thanks in advance!
Answer by Invertex · Jan 14, 2014 at 11:58 AM
Using key-presses that modify rigidbody2D.velocity or use rigidbody2D.AddForce. There isn't really any other way, and it's as efficient as it gets. You don't want to manually translate the character, it won't work right.
Your answer
Follow this Question
Related Questions
Rigidbody Overhead 1 Answer
Inconsistent Rigidbody2D velocity. 0 Answers
Velocity Movement & Physics Interactions by Rigidbody2D 0 Answers
Object jumps right after the attached HingeJoint2D is Enabled 0 Answers
2D Mouse Look with Collisions 1 Answer