Skip to content

Commit 0a6c134

Browse files
authored
Merge pull request #9382 from fmnjose/patch-1
Change misleading comment in 'Your first 3D game'
2 parents b2647dd + d3e8abd commit 0a6c134

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

getting_started/first_3d_game/06.jump_and_squash.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,11 @@ With this code, if no collisions occurred on a given frame, the loop won't run.
241241
# We get one of the collisions with the player
242242
var collision = get_slide_collision(index)
243243

244-
# If the collision is with ground
244+
# If there are duplicate collisions with a mob in a single frame
245+
# the mob will be deleted after the first collision, and a second call to
246+
# get_collider will return null, leading to a null pointer when calling
247+
# collision.get_collider().is_in_group("mob").
248+
# This block of code prevents processing duplicate collisions.
245249
if collision.get_collider() == null:
246250
continue
247251

0 commit comments

Comments
 (0)