0 votes

So here's what im trying to do:
I made a sliding mechanic which work 80% but now there's this problem I don't know how to solve, you see when a player slide they go that direction and only that direction if they look another way they won't be going there unless they toggle sliding off I'm trying to do the exact same thing
I want to know how to make it that when i slide i keep going that direction no matter where my camera looks at

Godot version 3.4.4
in Engine by (57 points)

can you show me Your Code?

Absolutely! Sorry for the late response i was on a vacation heres the code it's from garbaj video:

If event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED:
     rotate_y(deg2rad(-event.relative.x * Mouse_sen))
     camera.rotate_x(deg2rad(-event.relative.y * Mouse_sen))
     camera.rotation.x = clamp(camera.rotation.x, deg2rad(-80), deg2rad(80))

All of this is in the _input function

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.