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

Is there a way to "rotate" the direction of addForce (without using addRelativeForce)?

$
0
0
Trying to word this best I can. say I add this to a rigidbody object: Vector3 dir = new Vector3(1, 0, 1); rigidBody.addForce(dir); From a top-down perspective, this will push the object up-right (in respect to the world’s coordinates), but I want it to move up-left, and instead of doing: dir = new Vector3(-1, 0, 1), is there something I can do to dir or addForce to move the object up-left while keeping dir = 1, 0, 1? kind of like “rotating the whole world” instead

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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