okay but how do i check that ?
my code doesnt seem to work pls help me
i got them from a video on youtube that changes the movement from the arrow keys to the azerty keys
oke i tried the arrow keys and that does work
these are the inputs i use
ooooh okay thank you
thank you its working now, i feel stupid xp but thanks, only thing is when i go crouch and let it go , its like i get puched in the air a little and then back to the ground
how can i change that ?
iv got a other problem now with some code
func _unhandled_input(event):
_mouse_input = event is InputEventMouseMotion and Input.get_mouse_mode()
Input.MOUSE_MODE_CAPTURED
if _mouse_input:
_rotation_input = event.relative.x
_tilt_input = event.relative.y
This is the error i get :
Line 25:Unexpected "Identifier" in class body.
Line 26:Unexpected "Indent" in class body.
Line 27:Unexpected "Indent" in class body.
Line 28:Unexpected "Identifier" in class body.
Line 30:Expected end of file.
- Edited
Elroy Input.MOUSE_MODE_CAPTURED
Why is that line there? It's not indented, which is causing the error messages.
It also has no purpose.
i was watching a video to make mouse movement , idk how to fix it xp
- Edited
These two lines:
_mouse_input = event is InputEventMouseMotion and Input.get_mouse_mode()
Input.MOUSE_MODE_CAPTURED
should be this single line:
_mouse_input = event is InputEventMouseMotion and Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED
thank you but now i can just look down till the camera is fully rotated how do i fix that the camera has a up and down limmit ?
func _ready():
original_scale = scale
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _input(event):
if event is InputEventMouseMotion:
rotate_y(deg_to_rad(-event.relative.x * mouse_sens))
head.rotate_x(deg_to_rad(-event.relative.y * mouse_sens))
this is what i have