Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Rigidbody acting weird using AddForce()

$
0
0
This might seems ridiculous but it is what happened. I Created three game objects, attaching rigid body with mass = 10 and drag = 3 and capsule collider to it. Then I attach the following script: public class RigidbodyTest : MonoBehaviour { void Start () { GetComponent().AddForce(0.0f, 0.0f, 2000.0f, ForceMode.Impulse); } } When they starts from (0, 0, 0), (20, 0, 0), (40, 0, 0) respectively: ![alt text][1] The one starting from (0, 0, 0) is falling behind, I have no idea why. Then I tried moving her to (60, 0, 0) and start over: ![alt text][2] This time they all reached the same z position. Also, sometimes when I AddForce() to a rigidbody, it'll move extremely fast like it has no mass. But when it reside to sleep and being AddForce() after that, it'll resume to normal. It happened frequently but I was not able to conclude how to reproduce it. It just happens. Anyone knows what happened? I've never tried physics before 4.3.4f1 so I do not know if older version also has this problem. [1]: /storage/temp/22403-unity1.png [2]: /storage/temp/22404-unity2.png

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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