Spawn object at intersection of a detected plane and an image tracker in ARkit

Hi! My name is Ariel, first time poster, long time lurker! great community you have going on here.

I’m creating a project where I’m using the HandHeld template as a starting point, I managed to make it recognize a tracker and spawn an object, but the image tracking system is kind of unstable in my opinion, having lots of drift and offseting the object the more you move around it, an issue that world tracking and plane detection don’t have(or at least it’s a lot more stable). I was wondering if there’s a way to spawn an object on a detected plane only if there’s a marker on that plane, so i could use the more reliable method for tracking, but detect a pattern to determine the spawn position.

I’m attaching my current blueprint nodes and a video showing the drift.

ARKit Image Detection Drift (The drift happens on the second half of the video)

Answering to myself and any poor newbie like me that attempts to do this. I managed to do this by detecting the tracker, getting it´s world position, converting it to screen space and feeding that to the existing spawn method that comes with the Handheld template, replacing the touch location in the blueprint. I’m attaching my blueprint graph so you can build your own thing. This method doesn’t update the position of the 3d object when you move the tracker, but that was kind of my goal here, use the tracker just as an easier spawing method over the detected AR planes.

Best regards to anyone who reads this!

How do you update BP has spawned?

323588-screenshot-2020-12-01-162825.png

Got it!