AI Slop
This commit is contained in:
parent
2b5935feae
commit
fa7c562bb5
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user