0 votes

Hello everyone,

I made a Raycast that works as it should and properly collides with Staticbodies. The code returns the collision in a dictionary as it should using space_state.intersect_ray(from, to)

However, this Raycast does not collide with my Gridmap, which is made of a Staticbody with a MeshInstance and a CollisionShape.

Any idea why ?

This is the Raycast code
That is the Scene that I converted into a MeshLib
That is my main scene setup

The ultimate goal is to detect which tile is being hit, but I'm pretty confident I can achieve it with world_to_map once I overcome this collision issue.

Thank you for your help !

Godot version v3.4.2
in Engine by (56 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.