Fun with the body angular velocity things

This commit is contained in:
karl committed 2020-02-02 15:14:35 +01:00
1 parent c4e4bdf5a7
commit d69a5c0c97
4 files changed
+8 -14

No files matched your search

+3 -6
View File
@@ -31,9 +31,6 @@ func _physics_process(delta):
apply_torque_impulse(rot_vector * current_angle * 7)
apply_impulse(transform.basis.xform(Vector3.ZERO), -(transform.basis.y) * 0.05)
if current_angle < 0.1:
angular_velocity = Vector3.ZERO
for axis in angular_velocity:
if axis > 10:
axis -= axis * 0.75
# if current_angle < 0.1:
# angular_velocity.x = 0
+1
View File
@@ -16,6 +16,7 @@ mass = 1.73469
gravity_scale = 1.5
contacts_reported = 5
contact_monitor = true
angular_damp = 0.5
script = ExtResource( 1 )
[node name="TorsoCollider" type="CollisionShape" parent="."]