Hey,
In the last version that is now on the asset store, the MoveTo node will get queued one after the other, so that all objects will move in order one after the other, so that there is no need of the coroutine node. Is that what you want? The objects to move one after the other?
Also I spoted a small bug in the MoveTo node script. Here is a fix.
Please open up Movement.cs script and replace the whole MoveTo class with the following new code:
Thanks Nav, yes that was exactly what I meant. I had tried my graph as per upload, but it moved only half of the objects so I had assumed I had something missing… which led me to think coroutine.
Perhaps the bug fixes? I will try again with the fix and report back again.
That said, it’s almost Easter so if I don’t catch you before you leave for the holidays, I hope you have some well-deserved time off 😉
Hey,
Can you please confirm that you have the latest version from the asset store?
Also thanks a lot for the holiday wishes. I hope you have a good time as well 🙂
The key is Stopping Distance. As a test I was attempting to move all objects to one fixed position. So the 1st got there, called the 2nd, then 1 & 2 fight to occupy the one space, and so neither could reach their destination… meaning the 3rd object couldn’t even start. Add in some stopping distance, they each move in turn.
Now I need to understand another key here. You are using SetDestination instead of Move. SetDestination has to transition, whereas if you need to move something directly to target without animation, Move is needed. I thought maybe using SetDestination with a speed of 0 might be the same, but it doesn’t appear that way…
Confirmed. If I change the code from SetDestination to Move, all objects simply snap to location.
I don’t know how you will want to handle this Nuv, your Move is really SetDestination Sequentially. Which is excellent!
Maybe keep SetDestination in the code but have a condition that if Speed is zero, use Move instead… or it could equally add to your node count by adding another.
Thanks for letting me know. I though you originaly wanted to use pathfinding and not warp the agent to the target position.
I’ve changed the node as you suggested so that if the speed is 0, it will warp the agent instead of set it’s destination.