world: added grass and sky #5

Merged
jeremy merged 6 commits from devel into master 2026-01-27 10:52:35 +13:00
Showing only changes of commit c78368c89e - Show all commits

View file

@ -21,8 +21,8 @@ func rotate_camera_x(x, delta):
func _input(event):
if event is InputEventMouseMotion:
mouse_x_velocity = event.velocity.x
mouse_y_velocity = event.velocity.y
mouse_x_velocity = event.relative.x
mouse_y_velocity = event.relative.y
func _process(delta):
# rotate outer gimbal around y axis
@ -40,10 +40,10 @@ func _process(delta):
locked_mouse_positon = get_viewport().get_mouse_position()
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
if mouse_x_velocity > 200 or mouse_x_velocity < -200:
y -= clamp(mouse_x_velocity / 500, -5, 5)
if mouse_y_velocity > 200 or mouse_y_velocity < -200:
x -= clamp(mouse_y_velocity / 1000, -5, 5)
if mouse_x_velocity > 5 or mouse_x_velocity < -5:
y -= clamp(mouse_x_velocity / 12.5, -10, 10)
if mouse_y_velocity > 5 or mouse_y_velocity < -5:
x -= clamp(mouse_y_velocity / 12.5, -10, 10)
else:
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
mouse_locked = false