#Camera3D keeps tilting sideways when rotating.

1 messages · Page 1 of 1 (latest)

wanton halo
#

I've tried every solution i could think off, but all of them end up tilting the camera to the side. I added an image of all the things i've tried.

I just want a camera that looks up, down, left and right.

dull oriole
#

You might need to track pitch and yaw variables manually, then manually set the transform basis. I also tried, with your code, several combinations of .Rotated(), using both the global Vector3.Right values or the local transform.Basis.X values. If you do rotations on two axes at once with your method, you get tilting.

The official docs has an example for tracking your own angles here: https://docs.godotengine.org/en/stable/tutorials/3d/using_transforms.html#setting-information

wanton halo
#

I found that the docs have an example of 3D movement that calls Orthogonalize() every time it changes an axis, that fixed it for me so far.