Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | ragacakaci |
func _unhandled_input(event):
if event is InputEventMouseMotion:
_handle_camera_rotation(event)
func _handle_camera_rotation(event):
rotate_y(deg2rad(-event.relative.y * camera_sensitivity))
payer1.rotate.x(deg2rad(-event.relative.x * camera_sensitivity))
payer1.rotation.x = clamp(payer1.rotation.x, deg2rad(MIN_CAMERA_ANGLE), deg2rad(MAX_CAMERA_ANGLE))
func _get_movement_direction():
var direction = Vector3.DOWN
if Input.is_action_pressed("forward"):
direction += transform.basis.z
if Input.is_action_pressed("backwards"):
direction -= transform.basis.z
i dont get it whats the problem here can somvone help me
You’ve asked the same question again, but not answered the comment on the other question. It will make it much easier to answer if you tell us which line is getting the error.
SteveSmith | 2022-11-30 12:07