Merge branch 'master' of https://gitlab.hexaquo.at/mga/retrace
This commit is contained in:
commit
233573ad44
@ -142,10 +142,8 @@ func check_interact():
|
||||
func _input(event):
|
||||
# capture mouse movement
|
||||
if event is InputEventMouseMotion:
|
||||
_body.rotate_x(deg2rad(event.relative.y * MOUSE_SENSITIVITY * -1))
|
||||
_camera.rotate_x(deg2rad(event.relative.y * MOUSE_SENSITIVITY * -1))
|
||||
self.rotate_y(deg2rad(event.relative.x * MOUSE_SENSITIVITY * -1))
|
||||
|
||||
var camera_rot = _body.rotation_degrees
|
||||
camera_rot.x = clamp(camera_rot.x, -70, 70)
|
||||
_body.rotation_degrees = camera_rot
|
||||
# interact with object player is looking at
|
||||
# Prevent player from doing a purzelbaum
|
||||
_camera.rotation_degrees.x = clamp(_camera.rotation_degrees.x, -70, 70)
|
||||
|
Loading…
x
Reference in New Issue
Block a user