ARKit dynamic update questions

Hello there,

I’ve got an idea for an ARKit project and I want to include some dynamic pathfinding functionality. I’m thinking that the A* Pathfinding Project might help me accomplish my goal, but I wanted to ask some questions here before pulling the trigger on a $100 asset! Let me start with a description of what I want to accomplish and what I have to work with:

ARKit (https://developer.apple.com/arkit/) will detect horizontal planes in the real world and convert them into Unity3D planes that you can place geometry on and interact with. You can subscribe to events that will 1) add newly detected planes to world space and 2) update the geometry of existing planes that were already detected initially (like if you only detected half of a table and then later scanned the rest of it and created more space). I want to be able to place a character on an arbitrary plane and have it be able to navigate around the planes and move between them, possibly via some kind of dynamic off-mesh link.

So for my questions:

  1. Is this plugin fast enough to do dynamic updates to navigable areas when the size and location of the planes is updated fairly frequently?
  2. Is there an established way to create dynamic off-mesh links? I.E., if I have my character running around on a plane that is on my floor and I want him to jump up on to a plane that is on top of my kitchen table, can this plugin handle such a thing in real time?
  3. If this all is indeed possible, can it be done with the free version or would I need the pro version?

I think that this plugin can probably achieve what I want it to do, so I hope my questions have been specific enough! I look forward to hearing back- for now I’m just going to mess around with the example scenes.

Thanks,
Mike Nesta

Looks like maybe the NodeLink2 class could be of some help? But can they be dynamically generated?

Hi

Recalculating the whole graph in a single frame every time is probably too slow (at least one a mobile device), however the package does have support for async scans which can improve performance a bit. I would try to keep the updates to a minimum.

Units can move along a planar surface oriented in any way (since 4.x).

Yes you can use the NodeLink2 class. I’m afraid node links is one of the areas of the system which I am the least happy with, there are some rough edges unfortunately. Currently the AIPath script (default movement script for grid graphs) does not have good support for moving along custom node links. It will follow them, but it will do so like they were like any other part of the path, it will not play a custom animation or something like that. I don’t think it’s terribly hard to implement something like that however.

  1. Everything you have mentioned is possible with the free version.
    In the future you might want the pro version to be able to use more multithreading if you have many units that are going to move around.

There is no built-in way of automatically generating them unfortunately. You can however instantiate them from script if you want to.