This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

I am trying to implement twin stick controls in my 3rd person RPG game. The look and feel I am aiming for is similar to Ocotpath Traveler (2D sprites in a 3D world).

enter image description here

Right now my player character is structured like this:

KinematicBody
 -CollisionShape
 -Sprite3D
 -AnimationPlayer
 -Spatial
 --Camera
 -Spatial(attackRotation)
 --Sprite3D(AimIndicator)

And my code looks like this:

if Input.is_action_pressed("rotate_left"):
    attackRotation.rotate_y(deg2rad(3.5))

if Input.is_action_pressed("rotate_right"):
    attackRotation.rotate_y(deg2rad(-3.5))

But right now, it just rotates the indicator clockwise/counterclockwise when I tilt my right analog stick to the right/left. What I am trying to do is a more direct control. For example: When the player tilts the stick to the top-left, I want the indicator jump to the top-left of the character model.

How would you implement these kind of controls?

in Engine by (22 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.