Quantcast
Channel: Answers for "Why does this piece of code work with gravity and this one dosent"
Browsing latest articles
Browse All 4 View Live

Answer by Rostam24

When I changed every rigidbody in my game to rigidbody2d, I had the same problem. Eventually, I ended up using rigidbody2d.AddForce for everything. Setting velocity or moveposition in one place would...

View Article


Answer by cjdev

In the first commented line you are moving in both the x-axis, by 'moveVelocity' units to the right, and in the y-axis, by your Rigidbody y-velocity (gravity). In the second line you are moving only in...

View Article

Browsing latest articles
Browse All 4 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>