Added rules
This commit is contained in:
parent
b42b1ae39f
commit
0385858d4f
10 changed files with 423 additions and 85 deletions
|
|
@ -56,19 +56,19 @@ func _process(delta):
|
|||
if rotating:
|
||||
rotate_2d_position = get_viewport().get_mouse_position()
|
||||
var mouse_diff = rotate_2d_position - rotate_2d_position_old
|
||||
rotation.y = old_y_rotation - mouse_diff.x * 0.005
|
||||
azimuth_pivot.rotation.x = old_x_rotation - mouse_diff.y * 0.005
|
||||
rotation.y = old_y_rotation - mouse_diff.x * GameSettings.camera_rotation_speed / 1000.0
|
||||
azimuth_pivot.rotation.x = old_x_rotation - mouse_diff.y * GameSettings.camera_rotation_speed / 1000.0
|
||||
pass
|
||||
|
||||
if Input.is_action_pressed("camera_left"):
|
||||
position -= transform.basis.x * 0.2
|
||||
position -= transform.basis.x * GameSettings.camera_movement_speed / 1000.0
|
||||
if Input.is_action_pressed("camera_right"):
|
||||
position += transform.basis.x * 0.2
|
||||
position += transform.basis.x * GameSettings.camera_movement_speed / 1000.0
|
||||
|
||||
if Input.is_action_pressed("camera_up"):
|
||||
position -= transform.basis.z * 0.2
|
||||
position -= transform.basis.z * GameSettings.camera_movement_speed / 1000.0
|
||||
if Input.is_action_pressed("camera_down"):
|
||||
position += transform.basis.z * 0.2
|
||||
position += transform.basis.z * GameSettings.camera_movement_speed / 1000.0
|
||||
|
||||
if position.length() > world_distance_limit:
|
||||
position = position.normalized() * world_distance_limit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue