hello friends, first of all I must tell you that I’m new to unity I am, I’m doing a script in C# that controls the movement of an Osprey i’m using a model with rigidbody I think is a more realistic alternative. I show a little code:
for elevation:
rigidbody.velocity = new Vector3(0, elevation, 0);
for rotation:
rigidbody.MoveRotation(Quaternion.Euler(ospreyEuler));
Now the problem arises here when I want to apply a force forward or backward:
rigidbody.AddRelativeForce(transform.forward * verticalSpeed, ForceMode.Impulse);
once rotated model the forward vector object is not updated so that upon application of the force moves in what was forward before rotation ie if there is a rotation in the osprey 90 degrees to the right and apply the force for forward the osprey is moving to the left and vice versa.