Skip to content

Commit c50cf78

Browse files
committed
Pong demo: Fix ball velocity decay
In moddable pong the project had linear damp and angular damp in zero. To do that only for the ball (not project wide) we can set linear and angular damp mode to "replace" in the RigidBody2D.
1 parent b129a33 commit c50cf78

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pong_game/ball.tscn

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ continuous_cd = 1
2020
max_contacts_reported = 1
2121
contact_monitor = true
2222
linear_velocity = Vector2(353.553, 353.553)
23+
linear_damp_mode = 1
24+
angular_damp_mode = 1
2325
script = ExtResource("1_vdrab")
2426

2527
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]

0 commit comments

Comments
 (0)