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

Add force problem

$
0
0
So, i'm making flying physics for spaceship... What i want to do is when i hold W, i want the force to push me from it's back, so when i rotate his nose to up, it's gonna start pushing him up... Right now what i have is just pushing it forward no matter what rotation there is... How would i do this ? Here's a photo that might explain it better: ![alt text][1] [1]: /storage/temp/36147-explaination.png Also, here's a code i use to go forward: SpaceShipTransform.gameObject.rigidbody.AddForce(Vector3.right * Time.deltaTime * ForwardSpeed); And this is the one i use to rotate the nose: transform.RotateAround(transform.position, -transform.up, Time.deltaTime * PullSpeed);

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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