+1 vote

I am trying to build a FPS character controller .
I have this structure for the character :

Name [Type] (Script) {comment}

  • Player Scene { For instance from another scene }
    ++ Player [Kinematic Body] (Player.gd)
    +++ Collider [Collision Shape]
    +++ Animator [Animation Player]
    +++ Eyes [Camera] (Eyes.gd)
    +++ Mesh [Mesh Instance] { Not yet added }

I have the following script for the camera :
https://pastebin.com/5uLLZrY4

I am trying to create a "Look Around" mechanic when the player holds a certain action key then the camera would rotate but the body (Parent) won't . Simular to the game Gundam Side Story 0079 - Rise from the Ashes for sega dreamcast where the player controls the camera with analog stick and the legs with d-pad . When I print the angle of the camera I get the correct values , but it does not actualy rotate . Is it actually possible to rotate a child withought rotating the parent ? If so can someone explain why my code doesn't work .

I tried using the cameras setastoplevel() function but it did not work.

in Engine by (17 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 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 webmaster@godotengine.org with your username.