# How to make a 3d plane turn on all axis realistically?(with induced drag)

So, I’ve got a script that makes my plane fly realistically, but I’m unable to figure out a realistic way to turn it with induced drag no matter how many times I’ve tried, so I have no choice but to turn to the almighty knowledge of the forums (I’ve only been doing Unity for 2 years, so I’m slightly new and I’ve never made a flight game before)

I guess that’s similar to what I want.

Ok, I’ll try to look up some things and try to recreate that.

One of the things that’s really annoying is trying to figure out how to change trajectory faster, because I’ve now figured out how to rotate the plane realistically(e.g animation curves), because I cannot find a way to do that no matter where I search

No problem, I can wait as long as I need for the almighty knowledge of the forum users

I couldn’t find my script but I guess it shouldn’t be too hard to do:

• You add a rigidbody with angular drag to around 2 and remove gravity, a collider and a script to your plane
• The script will get the inputs for the x and y rotation:
``````float rotateInputH = Input.GetAxis("Horizontal");
float rotateInputV = Input.GetAxis("Vertical");
``````
• You constantly apply a force to the forward of the plane:
``````this._rigidbody.velocity = this.transform.forward * this.moveSpeed;
``````
• You apply a torque based on the inputs: (not sure if this will have the desired effect but I can’t test rn…)
``````if (rotateInputH != 0) {
}
if (rotateInputV != 0) {
}
``````

I used these variables:

``````private static int ROTATION_ANGLE_DELTA = 1;

public float moveSpeed = 8;
``````

I hope it helps, I’ll do a proper test tomorrow morning (already midnight here)

Well it’s definitely not the good camera for this and idk it’s kinda not great to turn around, I’ll try something different if I have time tomorrow:

I’ll try this. Thanks a lot!(I also already have a realistic drag , lift and thrust system to use, and sorry for the late response, I was on a walk and I live in eastern Canada, so it’s only 9 for me)

I think the main problem of flight that I’m having(I tried some of your code) is changing direction, that’s about the only problem now.

It’s not the rotation, it’s the trajectory changing too slow

I based everything on the rigidbody’s rotation so when you rotate you could also have to change the vertical rotation to turn but I guess real plane’s trajectory is also influenced by the wing’s flap thingy, so you can add another vector to the rigidbody’s velocity:

``````float sensitivity = 5f;
this._rigidbody.velocity = this.transform.forward * this.moveSpeed + this.transform.right * rotateInputH / sensitivity;
``````

But I don’t think it will make it much better.

Could you explain or show what kind of game you are trying to make? the example I shown you works because it’s a runner so the plane doesn’t need to rotate a lot

Crap, I forgot about this, I’ll give some screenshots and maybe a video explaining my problem when I can, if I don’t find a fix