Merge branch 'master' of https://gitlab.hexaquo.at/ggjg20/bodypartfighter
This commit is contained in:
commit
18158fa8de
6 files changed
+1158
-10
No files matched your search
@@ -17,9 +17,9 @@ material/0 = null
|
||||
[node name="OmniLight" type="OmniLight" parent="."]
|
||||
transform = Transform( 1, 3.12639e-13, -1.77715e-26, -3.12639e-13, 1, -5.68434e-14, 0, 5.68434e-14, 1, 0, 0, -1.5 )
|
||||
visible = false
|
||||
light_color = Color( 0.956863, 0.121569, 0.121569, 1 )
|
||||
light_energy = 3.86
|
||||
omni_range = 1.8
|
||||
light_color = Color( 0, 0.188235, 0.756863, 1 )
|
||||
light_energy = 10.0
|
||||
omni_range = 2.0
|
||||
|
||||
[node name="Area" type="Area" parent="."]
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ func _physics_process(delta):
|
||||
|
||||
var rot_vector = (-transform.basis.z).cross(ground.transform.basis.y)
|
||||
|
||||
if current_angle > 0.3:
|
||||
apply_torque_impulse(rot_vector * current_angle * 7)
|
||||
elif current_angle > 0.05:
|
||||
apply_torque_impulse(-(rot_vector * current_angle * 20))
|
||||
else:
|
||||
for body in get_colliding_bodies():
|
||||
if body.name == "StaticBody":
|
||||
for body in get_colliding_bodies():
|
||||
if body.name == "StaticBody":
|
||||
if current_angle > 0.3:
|
||||
apply_torque_impulse(rot_vector * current_angle * 7)
|
||||
elif current_angle > 0.05:
|
||||
apply_torque_impulse(-(rot_vector * current_angle * 20))
|
||||
else:
|
||||
angular_velocity = Vector3.ZERO
|
||||
|
||||
print("deg: %s" % rad2deg(current_angle))
|
||||
|
||||
Reference in new issue
Block a user