Fixes and blue light instead of red

This commit is contained in:
mathias committed 2020-02-02 12:59:47 +01:00
1 parent 9defb29c04
commit d278bf5552
7 files changed
+1163 -13

No files matched your search

+3 -3
View File
@@ -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="."]
+7 -7
View File
@@ -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))