added continuous collision detection and removed print statement

This commit is contained in:
pennyrigate 2023-09-29 15:18:36 -04:00
parent 140116bb30
commit de38a0f5d9
2 changed files with 1 additions and 1 deletions

View file

@ -15,7 +15,6 @@ func _on_Hurtbox_area_entered(area: Area2D) -> void:
func _physics_process(delta: float) -> void: func _physics_process(delta: float) -> void:
var speed: float = inverse_lerp(0.0, 250.0, linear_velocity.length()) var speed: float = inverse_lerp(0.0, 250.0, linear_velocity.length())
print(speed)
glow.energy = lerp(0.0, max_glow, speed) glow.energy = lerp(0.0, max_glow, speed)

View file

@ -13,6 +13,7 @@ radius = 4.0
[node name="ZBall" type="RigidBody2D"] [node name="ZBall" type="RigidBody2D"]
mass = 5.0 mass = 5.0
physics_material_override = SubResource( 2 ) physics_material_override = SubResource( 2 )
continuous_cd = 2
script = ExtResource( 1 ) script = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]