addForce (IMPRECISION?) object changing direction after a few frames of launch...

Hi,

I've created a simple plane and a flat cylinder...

When I apply a rigidbody.AddForce to this cylinder it moves nice in the begining sliding alog the plane using the vector direction at initial launch... But then somehow a little later (a few frames) it changes direction? Seems like an unexpected influence or force makes the object move and perturb it's original direction...

Is this some bug or something?

Thanks in advance,

It will almost certainly be the parameters are you passing changing. If, for example, you are passing transform.forward, then when the cylinder rolls, the "forward" rotates around to face the other way. So then it's not that AddForce is doing anything different, but rather that what you're passing is different.

So pass constant values and the direction will be constant.

Hi there,

After rebuilding the whole project again I have come to the same "bug". I'm calling this a "bug" because I'm not really sure it is a bug but for sure this rather simple scene shows some awckward behavior.

So, I have tried playing with the rigidbody materials, using ice and all other as suggested...

I have also made sure that the added force only applies during one frame, that is, there are no other forces being applied after the object has been launched!

Still, incredibly, somehow the launched cylinder changes direction after a few frames, it does not move straight...

Could anyone try building this scene (simple plane, flat cylinder like a button, launch this cylinder using rigidbody.AddForce in various directions and check out after a few frames if cylinder maintains it's original launch direction vector before stopping)

Thank you.

Try ticking the box for freeze rotation. With the same setup you described, the cylinder rolls off in some random direction without it ticked, with it on it slid in the correct direction

Hi Mike

Thank you for your answer, although that does not solve the problem.

After adding a trail renderer and an orthographic top cam, I could see that there really is something wrong with this issue. The object does curve regardless of material, mass and freeze rotation settings and the worst part is that it seems to "snap" to one of the world axis like x or z...

You can check out the video posted that shows this problem.

http://forum.unity3d.com/viewtopic.php?t=59137&highlight=addforce

If anyone would know what is happening or could help, please do.

Thank you,

Set the BounceThreshold in Edit->Project Settings->Physics to a smaller value.

Hi Wolfram,

Nothing has changed by setting the Bounce Thresould.

This is getting creepy. I have reported this as a bug. No answers yet!