various fixes

This commit is contained in:
bee
2026-07-09 08:18:48 +02:00
parent c4f2c0a202
commit e78d11998f
10 changed files with 33 additions and 25 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ func launch(def: AmmoDef, muzzle: Transform3D, speed_scale := 1.0) -> void:
reset_physics_interpolation()
func _physics_process(delta: float) -> void:
if Vector3.UP.cross(linear_velocity).length_squared() > 0.01:
if linear_velocity.length_squared() > 0.01 and absf(linear_velocity.normalized().dot(Vector3.UP)) < 0.999:
look_at(global_position + linear_velocity)
_time_left -= delta