Unity 2017 Beginner Tutorial 3 - Using Rigidbody to move an object

Words
146
Reading
1 min
Listen
Play
8y

In my previous tutorial, I used the transform.translate() function to move my main character, which resulted in a bug - the player gets absorbed into a wall. This is because the main character is not considered as a physics object when you move it with transform.translate(). So in this tutorial we learn how to declare a rigidbody variable, how to assign the player's rigidbody component to this variable, and then how to use the rigidbody.movePosition function to move the player, so that it will collide properly with the wall.


Posted from my blog with SteemPress : http://magicmonktutorials.com/blog/2018/11/11/unity-2017-beginner-tutorial-3-using-rigidbody-to-move-an-object/




Mathematics & Digital Technologies Education

Videos, quizzes, and other learning resources

Eddie the Magic Monk has 14 years teaching experience as a high school teacher in Australia. He will explain things to you in the simplest way possible to help you fully understand high school mathematics and computer science concepts.