how do i move godot camera along Y axis without tilting

BirdUp

The Worst Show on Television
kiwifarms.net
Registrado
17 de Dic, 2022
1697710714967.png
ive nailed down everything but y-axis rotation because it keeps tilting
duckduckgo is complete shit and brings up r/unity3d posts
no i will not install a camera plugin
 
Última edición:
Solución
its supposed to be a question lol

the documentation tells you nothing about scripting Camera3D nodes
Double posting bc fuck you. Part of the problem may be that you're rotating the camera and then seperately rotating the player mesh. In Godot, when you rotate or move a node, you also rotate and move its children, so you're actually rotating the camera twice for every movement of the mouse. You're also not resetting the basis, which is another possible cause of the tilting, but doing this would require you to seperately accumulate the rotation of the mouse (I think at least), like how the official docs do it, but if you're rotating incrementally each time (which you are) you might not have to worry about resetting the basis.
its supposed to be a question lol

the documentation tells you nothing about scripting Camera3D nodes
Double posting bc fuck you. Part of the problem may be that you're rotating the camera and then seperately rotating the player mesh. In Godot, when you rotate or move a node, you also rotate and move its children, so you're actually rotating the camera twice for every movement of the mouse. You're also not resetting the basis, which is another possible cause of the tilting, but doing this would require you to seperately accumulate the rotation of the mouse (I think at least), like how the official docs do it, but if you're rotating incrementally each time (which you are) you might not have to worry about resetting the basis.
 
Atrás
Top Abajo