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

in #steemstem6 years ago

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.

Sort:  




This post has been voted on by the SteemSTEM curation team and voting trail in collaboration with @curie.

If you appreciate the work we are doing then consider voting both projects for witness by selecting stem.witness and curie!

For additional information please join us on the SteemSTEM discord and to get to know the rest of the community!

thank you steemstem!

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

吃了吗?这是哪里?你是谁?我为什么会来这边?你不要给我点赞不要点赞,哈哈哈哈哈哈。假如我的留言打扰到你,请回复“取消”。

Coin Marketplace

STEEM 0.27
TRX 0.11
JST 0.030
BTC 70786.17
ETH 3822.35
USDT 1.00
SBD 3.50