Open CapybaraTV opened 1 year ago
Sorry. The code is wrong at line #Mouse Movement . The corect code is this: camera.transform.basis = Basis(Vector3(_mouse_motion.y -0.0005, _mouse_motion.x -0.0005, 0))
This page and nothing is the same thing. acomplishes nothing.
I have to remind you that we have a Code of Conduct. Please stay constructive.
Hello, I'll try to be short and direct. What do you need to make a First Person Shooter? Mouse look. What is not present at GODOT docs? Mouse look.
https://docs.godotengine.org/pt_BR/stable/tutorials/inputs/mouse_and_input_coordinates.html
This page and nothing is the same thing. acomplishes nothing. The VOXEL 3d tutorial actually helps with mouse look. On the player script:
func ready(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
func _process(_delta):
Mouse movement.
func _input(event): if event is InputEventMouseMotion: if Input.get_mouse_mode() == Input.MOUSE_MODE_CAPTURED: _mouse_motion += event.relative
Explanation: the ready function captures the mouse movement. The process function match the head(or camera) movement with the horizontal and vertical of the mouse. The input event function transfer the relative mouse movement every frame into a Vector to guide the camera.
Thats it. Thank you for your time. I hope this helps someone. God bless