From aad319ddb5be108e9ca81d407bd90c843bae502d Mon Sep 17 00:00:00 2001 From: Anson Bridges Date: Wed, 14 Sep 2022 23:59:22 -0400 Subject: GUNBRIG HULL PROTOTYPE --- godot/scripts/vehicles/Gunboat.gd | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'godot/scripts/vehicles/Gunboat.gd') diff --git a/godot/scripts/vehicles/Gunboat.gd b/godot/scripts/vehicles/Gunboat.gd index 8c3f54e..3137361 100644 --- a/godot/scripts/vehicles/Gunboat.gd +++ b/godot/scripts/vehicles/Gunboat.gd @@ -39,8 +39,6 @@ func mp_init(init_info): # Called when the node enters the scene tree for the first time. func _ready(): world = get_tree().get_root().find_node("GAMEWORLD", true, false) - mass = 13500 - weight = mass * 9.8 func on_no_control(): rudder = 0.0 @@ -80,8 +78,8 @@ func _physics_process(delta): if world.winddir.angle_to($Mast.global_transform.basis.x) < PI/2: add_force(global_transform.basis.x*push_force, Vector3.ZERO) add_torque(Vector3(0,-rudder_turn*rudder_constant*(0.5+linear_velocity.dot(global_transform.basis.x)),0)) - add_torque(Vector3(-1000000*angular_velocity.x,0,0)) - add_torque(Vector3(0,0,-1000000*angular_velocity.z)) + add_torque(Vector3(-10000000*angular_velocity.x,0,0)) + add_torque(Vector3(0,0,-10000000*angular_velocity.z)) rudder_turn += rudder_speed*delta*(-0.25 if rudder_turn > 0 else 0.25) for point in $FloatPoints.get_children(): for area in point.get_overlapping_areas(): -- cgit v1.2.3