Cancelling a path and other questions #18
ThurritoHatinEgotude
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there, I've implemented this wonderful system into my game and I've got it working for the most part. I just have a few questions about it, and forgive my ignorance but this is all rather new to me.
How can I cancel an agent's current path? I want to cancel it early in some cases.
How can I remove an agent from the system during runtime so that it's no longer an obstacle? I'm trying to find a solution where I can keep my "dead" agents in the world as a corpse but not be treated as obstacles anymore. I've tried disabling the NavMesh scripts but that doesn't seem to work.
I'm trying to mimic the behavior you see in RTS games like Starcraft where units will pathfind to the position of an enemy unit in order to attack it, avoiding others along the way and swarming the target. I currently have 10 units (GameObjects) in my scene, all setup to avoid one another, and properly pathfinding to each other's positions. However, once the units reach their targets and begin attacking (this is when I want to cancel their path) I run into an issue where my other units who were lagging behind get stuck as they stubbornly try to push their way through. They do slowly slide against the blockers and eventually get around them but this takes too long and isn't ideal. I assume I'm trying to do something that this system isn't really designed for but maybe I'm wrong. Any tips or ideas on this matter?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions