Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A* search can cause objects to teleport #203

Closed
Bam4d opened this issue Jun 23, 2022 · 0 comments · Fixed by #215
Closed

A* search can cause objects to teleport #203

Bam4d opened this issue Jun 23, 2022 · 0 comments · Fixed by #215
Assignees
Labels
bug Something isn't working

Comments

@Bam4d
Copy link
Owner

Bam4d commented Jun 23, 2022

Describe the bug

When A* search runs and there is no calculable path, the best path is used to calculate the action vector from the final possible action. In this case the best path is calculated from the destination object of the search. When there is no path to the source object, this destination vector can be right next to the destination object, causing the source object to teleport to this location.

To Reproduce
Create a level with 2 seperate rooms (no path between) with an object in both rooms and set the A* algorithm for those object to chase an object that is in the opposite room.

Expected behavior
the objects should probably just randomly walk.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. mac/linux/windows]
  • Version [e.g. 1.3.9]

Additional context
Add any other context about the problem here.

@Bam4d Bam4d self-assigned this Jun 27, 2022
@Bam4d Bam4d added the bug Something isn't working label Jun 27, 2022
@Bam4d Bam4d mentioned this issue Jul 29, 2022
@Bam4d Bam4d linked a pull request Jul 30, 2022 that will close this issue
@Bam4d Bam4d closed this as completed Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant