#Camera3D keeps tilting sideways when rotating.
1 messages · Page 1 of 1 (latest)
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
I did use those docs to come up with these solutions, but there was no mention of tilting other than "do not modify rotation as a Vector3, use transforms instead"
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.