Hi there, I'm currently prototyping movement for my first project. I have a spaceship modelled by a capsule. I'm using Code (CSharp): playerRb.AddRelativeForce(Vector3.forward * forwardInput); to apply a force in the direction of the front of the ship. The issue it, the way the capsule is set up "forward" is moving the ship sideways. I realise that I can fix this by using Vector3.left instead, but I'm wondering if there is a way to redefine the capsule so that, if this is my capsule: (=====), forward is to the right instead of up (as it is drawn in this post). Changing the scale doesn't give a capsule looking shape and rotating also rotates the "forward" direction. Is there any way for me to do this? I'd rather not use "left" for "forward" as it's going to lead to confusion when I replace the cylinder with the proper model.
Yes: create an empty GameObject, and put your cylinder inside that, oriented properly so that the parent object's +Z is forward. Put the Rigidbody and all scripts on the parent object — the cylinder should be nothing but the mesh renderer, and maybe a capsule collider. It's just the model, not the game object!
Rotating wont change "forward" direction in your case because Vector3.forward is a global space vector which isnt aware of object rotation. To get directions relative to the object, use shortcuts of the Transform component such as Transform.right, Transform.up and Transform.forward