Another 6DOF question.

I’m embarking on a flying game and need Yaw, Pitch, Roll.

I’ve searched and found several “solutions” to this problem but they all seem to behave in the same way which I’m sure is incorrect.

Both this

transform.Rotate(Vector3.forward * zAxis *Time.deltaTime * -turnSpeedY);

	transform.Rotate(Vector3.left * xAxis *Time.deltaTime * -turnSpeedY);

	transform.Rotate(Vector3.up * yAxis *Time.deltaTime * turnSpeedY);*/

and this

transform.Rotate (xAxis * Time.deltaTime * turnSpeedX * -1, 0 , 0, Space.Self); 

	transform.Rotate (0, yAxis * Time.deltaTime * turnSpeedX * 1 , 0, Space.Self); 

	transform.Rotate (0, 0 , zAxis * Time.deltaTime * turnSpeedX * -1, Space.Self);

lots of people have reported working. But when I try it, rolling 45 degrees and then using the yaw makes my plane swing from 45 degree roll, round to -45 degrees. The same issue happens with pitching while rolled.

Any ideas? There’s nothing more frustrating that the high hopes of working source code posted and the crushing defeat of it reacting not quite right.

Thanks in advance.

Oh my! Turns out it was the camera spinning around and making it look like it was working incorrectly! How embarrassing! Sorry everyone.