0 votes

So, the current it is:

var y_rotation = 0
if Input.is_action_pressed("cam_right"):
    y_rotation += deg2rad(90.0)
if Input.is_action_pressed("cam_left"):
    y_rotation += -deg2rad(90.0)
rotate_object_local(Vector3.UP, y_rotation * rotation_speed * delta)

Due to docker situation where mouse acting up big time in docker. So I am controlling the camera using keyboard only.

I noticed that my camera tilts rather than turn head to right/left.

See how my camera move rotate in y direction just fine? When it turn down, facing to the floor...the y direction move wrong way.
gif

How do you make it right? Or at least, make the Y stay in the fixed place without move it

Godot version 3.4
in Engine by (82 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.