0 votes

I have a (Kinematic2D) character that starts out falling to the ground. It collides with the ground.

This character is in an FSM. When a Ray2D (placed under the character) collides with the ground it will switch from the "Falling" state to the "Grounded" state.

The ground is a StaticBody2D with a CollisionShape2D.

The character collides with the ground just fine when the game starts and the character falls to the ground. However, when the character jumps and falls back down to the ground it doesn't collide with the ground even though it looks like it is when the game is running (the character doesn't fall through the ground).

I am running is_colliding() and it gives me false when the character is clearly colliding with the ground on the screen after jumping and falling back down onto it.

asked Jun 26, 2017 in Engine by alibix (35 points)

Maybe you never returned to falling?

Add some breakpoints and check if your states are set correctly.

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.