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

Coupling with AstarGrid2D #4

Open
spiroute opened this issue Nov 5, 2023 · 1 comment
Open

Coupling with AstarGrid2D #4

spiroute opened this issue Nov 5, 2023 · 1 comment

Comments

@spiroute
Copy link

spiroute commented Nov 5, 2023

Hi,
firstable i ' d like to say very impressive job.So simple and modulable.
I don't have any issue but do you have an advice plz if we want to use AstarGrid2D instead move_to function(in Satyr.gd)?
Many thanks.

@viniciusgerevini
Copy link
Owner

Thank you. I haven't used AstarGrid2D yet. I reckon the calculation and movement could still be abstracted via themove_to function, but instead of passing the direction you would have to pass the target position. Also, the cost calculation for actions would likely have to consider the length of the full path and not just the distance.

I'm not sure what's the challenge you are facing with astar. I think the closest I have of an example for the movement itself is an example using Navigation2D for Godot 3 https://github.com/viniciusgerevini/godot-navigation-2d-example
I guess this is a bit outdated but there you can find my logic to follow a pre-calculated path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants