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

Rigid body rotation question

$
0
0
Hi, iam working on this game where you sort of fly a rc plane and i have this problem with rotation.. When i try to turn the plane around, it continues flying in the direction it was flying before instead of a new direction achieved through rotating. Iam moving the plane using var plane : rigidbody; var planetran : Transform; plane.AddRelativeForce(planetran.forward* (speed - plane.velocity.magnitude)); and Iam rotating the plane with transform.eulerAngles.y += rotat; //where "rotat" is incriesed or decreased based on which direction i want to turn Ive tried both addforce and add relative force but it seems to have the same effect. The plane does turn a little bit but the moment I turn a little bit more than just about 5% it ends up flying sideways and also accelerating to enormous speeds..

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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