diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-10-09 04:45:45 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-10-09 04:46:01 -0400 |
commit | f7ec57998a1c3d0cf91c1fb017fd5a91bb1e0b96 (patch) | |
tree | ce0fbf5ed79731da5b216327a2e5cdc59df39fc6 /Ship.gd | |
parent | 4c9b0fdd23eda730abdc35f935bc011a3aea0765 (diff) | |
download | godot_wildjam_49-f7ec57998a1c3d0cf91c1fb017fd5a91bb1e0b96.tar.gz godot_wildjam_49-f7ec57998a1c3d0cf91c1fb017fd5a91bb1e0b96.zip |
Rework Buoyancy physicsduso-water-touchups
Simplify creating a buoyant object to just extending a class and setting the water plane.
Implement a new buoyancy estimation that should be a bit more accurate.
Diffstat (limited to 'Ship.gd')
-rw-r--r-- | Ship.gd | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -extends RigidBody +extends BuoyantBody export var ang_acceleration = 240.0 @@ -29,4 +29,4 @@ func _input(event): func _integrate_forces(_state): var stick = Input.get_axis("ship_right","ship_left") if stick != 0.0: - self.add_torque(Vector3.UP*stick*ang_acceleration) + self.add_torque(Vector3.UP*stick*ang_acceleration*self.mass) |