func _physics_process(delta):
#...
# Iterate through all collisions that occurred this frame
for index in range(get_slide_collision_count()):
# We get one of the collisions with the player
var collision = get_slide_collision(index)
# If the collision is with ground
if collision.get_collider() == null:
continue
The condition if collision.get_collider() == null: seems to never occur.
This confused me therefore I checked the completed project on Github and this condition is missing from the final code (see here)
I suppose the documentation is not up-to-date on this part.
Your Godot version: I am using
Godot_v4.2.2-stable_win64_console.exe
.Issue description: ✨Hello!✨
I am following the tutorial
Squash the Creeps
on the Godot 🤖 Documentation to learn the engine.In the section
Jumping and squashing monster / Squashing Monster
this example code is shown :The condition
if collision.get_collider() == null:
seems to never occur. This confused me therefore I checked the completed project on Github and this condition is missing from the final code (see here)I suppose the documentation is not up-to-date on this part.
It is my very first ticket on Godot ! 🎉🎫🎉
URL to the documentation page (if already existing): https://docs.godotengine.org/en/stable/getting_started/first_3d_game/06.jump_and_squash.html