0 votes

I'm creating fall-through platforms in a simple 2D platformer. For the most part, I'm using the technique described by Diet Estus in this answer.

However, that answer recommends using a downward raycast to get information about the type of floor. Maybe that is the best option for this, but it seems like there ought to be a simpler way. Ideally, there'd be a layer property on KinematicCollision2D, but that's not part of the API.

Is there a simpler way (other than using a raycast) for me to determine which collision layer the player is colliding with?

in Engine by (31 points)

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.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.