Pārlūkot izejas kodu

:beetle: Fix far foil craziness

Issue in apllying the force : removing extra conversion prevent from
plane to become out of control when far from origin.
DricomDragon 4 dienas atpakaļ
vecāks
revīzija
7a89b6664a
1 mainītis faili ar 1 papildinājumiem un 2 dzēšanām
  1. 1 2
      godot/component/entity/vehicles/biplan/biplan.gd

+ 1 - 2
godot/component/entity/vehicles/biplan/biplan.gd

@@ -69,8 +69,7 @@ func _apply_foil_resistance() -> void:
 	var foil_position : Vector3 = HorizontalFoil.get_position()
 	var horizontal_speed = linear_velocity.dot(transform.basis * Vector3.RIGHT)
 	var local_foil_force = Vector3.RIGHT * -foil_resistance * horizontal_speed
-	var foil_force = transform.basis * local_foil_force
-	apply_force(foil_force, foil_position)
+	apply_force(local_foil_force, foil_position)
 
 
 func _apply_lift() -> void: