The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

I'm trying to generate a simple visibility graph for use as a A* graph (Yes I there's a built in system but I want to use a obstacle vertex graph).
My process is as flows:

  1. Find the appropriate nodes for the graph, this is no problem
    Nodes
  2. Connect the points based on visibility, I do this by using intersect_ray. The water tiles have collisions. However I get a result as such:
    Missing connections

Obviously there are connections missing, by moving the edges of the collision bound of the water tile in by 1 pixel, this happened:
Correct connections except horizontal and vertical
Now all the connections are there but the ray slips through the 2 pixel gap between water tiles resulting in tiles horizontal or vertical to each other are always connected.

As far as I can see this is a engine bug, unless I'm doing something stupidly wrong.

Code is still a tad messy: https://github.com/EpEpDragon/LifeSim

in Engine by (20 points)
retagged by

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 Frequently asked questions and 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 [email protected] with your username.