0 votes

While creating the collision system for my game project I realized that I needed concave polygon shapes to act single sided, i.e. the collision normal returned by a RayCast is the same no matter which side it hits.
To do this, I decided to use RayCast.get_collision_shape() to get the specific shape that the ray collided with. If the shape is a concave polygon, then I'll find the face that the ray cast's collision_point corresponds with. Else I use the regular ol' get_collision_normal() method.
Now here's the problem with get_collision_shape. Instead of returning the shape's index, it gives the index of the triangle of the concave shape. While that saves the time to actually find the triangle, it means that a static body can only have its first shape interacted this way. Is this a bug, or intentional behavior that I'm not aware of?

in Engine by (3,873 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.