Shapes
This commit is contained in:
1 parent
84a4d375ca
commit
50e582f6d3
3 files changed
+25
-18
No files matched your search
@@ -22,9 +22,14 @@ func _physics_process(delta):
|
||||
|
||||
for body in get_colliding_bodies():
|
||||
if body.name == "StaticBody":
|
||||
if current_angle > 0.3:
|
||||
if current_angle > 0.3:
|
||||
apply_torque_impulse(rot_vector * current_angle * 7)
|
||||
apply_impulse(transform.basis.xform(Vector3.ZERO), -(transform.basis.y) * 0.05)
|
||||
elif current_angle > 0.05:
|
||||
apply_torque_impulse(-(rot_vector * current_angle * 20))
|
||||
apply_torque_impulse(-(rot_vector * current_angle * 5))
|
||||
else:
|
||||
angular_velocity = Vector3.ZERO
|
||||
|
||||
for axis in angular_velocity:
|
||||
if axis > 10:
|
||||
axis -= axis * 0.75
|
||||
Reference in new issue
Block a user