save changes

This commit is contained in:
Gary Steven Keough 2024-12-16 21:40:36 -05:00
parent c96b136d3e
commit 72cf4c0ff1
2 changed files with 13 additions and 9 deletions

View File

@ -21,7 +21,7 @@ var old_global_position_cache: Vector3
@export_range(0.01, 1.0, 0.01) var base_turn_speed: float = 0.35 @export_range(0.01, 1.0, 0.01) var base_turn_speed: float = 0.35
@export var max_turn_speed: float = 0.5 @export var max_turn_speed: float = 0.5
@export_range(0.01, 1.0, 0.01) var base_lift_speed: float = 2.0 @export_range(0.01, 10.0, 0.01) var base_lift_speed: float = 2.0
@export var top_speed: float = 5.0 @export var top_speed: float = 5.0
@export var move_speed: float = 1.0 @export var move_speed: float = 1.0
@export var acceleration: float = 0.1 @export var acceleration: float = 0.1
@ -71,17 +71,19 @@ func _physics_process(_delta):
angular_velocity.y = clamp(angular_velocity.y, -max_turn_speed, max_turn_speed) angular_velocity.y = clamp(angular_velocity.y, -max_turn_speed, max_turn_speed)
# Self level slowly if NetworkManager.is_host:
# Self level slowly if host
global_rotation.x = lerpf(global_rotation.x, 0, 0.1) global_rotation.x = lerpf(global_rotation.x, 0, 0.1)
global_rotation.z = lerpf(global_rotation.z, 0, 0.1) global_rotation.z = lerpf(global_rotation.z, 0, 0.1)
if old_global_position_cache != global_position: if old_global_position_cache != global_position:
NetworkManager.sync_property(uuid, "global_position", global_position) NetworkManager.sync_property(uuid, "global_position", global_position)
old_global_position_cache = global_position old_global_position_cache = global_position
if old_global_rotation_cache != global_rotation: if old_global_rotation_cache != global_rotation:
NetworkManager.sync_property(uuid, "global_rotation", global_rotation) NetworkManager.sync_property(uuid, "global_rotation", global_rotation)
old_global_rotation_cache = global_rotation old_global_rotation_cache = global_rotation
func _on_area_3d_body_entered(body: Node3D) -> void: func _on_area_3d_body_entered(body: Node3D) -> void:

View File

@ -24,6 +24,8 @@ gravity_scale = 0.0
script = ExtResource("1_ghft7") script = ExtResource("1_ghft7")
player_detection_area = NodePath("PlayerDetectionArea") player_detection_area = NodePath("PlayerDetectionArea")
helm_location_marker = NodePath("HelmLocationMarker") helm_location_marker = NodePath("HelmLocationMarker")
base_lift_speed = 5.0
top_speed = 50.0
[node name="ShipToShipCol" type="CollisionShape3D" parent="."] [node name="ShipToShipCol" type="CollisionShape3D" parent="."]
shape = SubResource("BoxShape3D_6gbwt") shape = SubResource("BoxShape3D_6gbwt")