AI Slop
This commit is contained in:
parent
2b5935feae
commit
fa7c562bb5
@ -75,13 +75,17 @@ func _predict_movement(_delta):
|
|||||||
# Simple linear prediction
|
# Simple linear prediction
|
||||||
var predicted_velocity = linear_velocity
|
var predicted_velocity = linear_velocity
|
||||||
predicted_position += predicted_velocity * _delta
|
predicted_position += predicted_velocity * _delta
|
||||||
|
|
||||||
# Basic rotation prediction (can be improved)
|
# Basic rotation prediction (can be improved)
|
||||||
var predicted_angular_velocity = angular_velocity
|
if angular_velocity.length() > 0:
|
||||||
var predicted_rotation_delta = Quaternion()
|
var predicted_angular_velocity = angular_velocity.normalized()
|
||||||
predicted_rotation_delta.set_axis_angle(predicted_angular_velocity, _delta)
|
var predicted_rotation_delta = Quaternion(predicted_angular_velocity, _delta)
|
||||||
predicted_rotation = predicted_rotation * predicted_rotation_delta
|
predicted_rotation = predicted_rotation * predicted_rotation_delta
|
||||||
|
|
||||||
func _apply_local_input(_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 turn_speed = base_turn_speed / max(mass, 1)
|
||||||
var lift_speed = base_lift_speed / max(mass, 1)
|
var lift_speed = base_lift_speed / max(mass, 1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user