Ship mostly works #10

Merged
chrisbell merged 60 commits from feature/ship-syncing into develop 2024-12-29 04:35:51 +00:00
Showing only changes of commit fa7c562bb5 - Show all commits

View File

@ -75,13 +75,17 @@ func _predict_movement(_delta):
# Simple linear prediction
var predicted_velocity = linear_velocity
predicted_position += predicted_velocity * _delta
# Basic rotation prediction (can be improved)
var predicted_angular_velocity = angular_velocity
var predicted_rotation_delta = Quaternion()
predicted_rotation_delta.set_axis_angle(predicted_angular_velocity, _delta)
predicted_rotation = predicted_rotation * predicted_rotation_delta
if angular_velocity.length() > 0:
var predicted_angular_velocity = angular_velocity.normalized()
var predicted_rotation_delta = Quaternion(predicted_angular_velocity, _delta)
predicted_rotation = predicted_rotation * predicted_rotation_delta
func _apply_local_input(_delta):
if piloting_player == null or not piloting_player.is_network_authority:
return
var turn_speed = base_turn_speed / max(mass, 1)
var lift_speed = base_lift_speed / max(mass, 1)