소스 검색

:wrench: Mega damp

Avoid mega loop when turning.

Allow to investigate better foil physics.

The foil seems to work horizontally, but not when falling on the side
(seems accelerating instead ?).
DricomDragon 2 일 전
부모
커밋
d24fc04c38
2개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      godot/component/entity/vehicles/biplan/biplan.gd
  2. 1 0
      godot/component/entity/vehicles/biplan/biplan.tscn

+ 3 - 3
godot/component/entity/vehicles/biplan/biplan.gd

@@ -4,10 +4,10 @@ extends SeatedVehicle
 const PLANE_FORWARD := Vector3.BACK # z increases when moving forward
 
 @export var thrust_power: float = 3500.0
-@export var turn_to_torque: float = 1000.0
-@export var move_to_pitch: float = 2000.0
+@export var turn_to_torque: float = 10000.0
+@export var move_to_pitch: float = 20000.0
 @export var wing_resistance: float = 2500.0
-@export var foil_resistance: float = 250.0
+@export var foil_resistance: float = 500.0
 @export var lift: float = 25.0
 
 var target_torque: float = 0.0

+ 1 - 0
godot/component/entity/vehicles/biplan/biplan.tscn

@@ -28,6 +28,7 @@ collision_mask = 27
 mass = 500.0
 contact_monitor = true
 max_contacts_reported = 1
+angular_damp = 30.0
 script = ExtResource("1_vi3fj")
 
 [node name="TheWindWaker_noWheel" parent="." instance=ExtResource("2_mr41j")]