I’ve implemented this as suggested, using a GraphSceneObject. Several times a second, I tag the area around each object’s current position, and untag their previous position.
This seems to be working fine on my desktop, but I run into problems on the iPad with lots of these warnings:
“Canceled path because a new one was requested.”
Should this code be reasonably performant on an iPad? I have 5 objects which call it 5 times a second, so 25 executions a second.
`protected void tagPosition(int tagId, Vector2 oldPosition, Vector2 newPosition) {
// Move to the old position and untag it
transform.position = oldPosition;
_graphUpdateScene.setTag = 0;
_graphUpdateScene.Apply();
// Move to our target's new position
transform.position = newPosition;
_graphUpdateScene.setTag = tagId;
_graphUpdateScene.Apply();
}`