Skip to content

SparkAR – how to track a plane surface (not image target)?

Is there any way to implement target tracking in SparkAR, but track the current plane where the 3d object is placed, instead of a predefined target image?

So, for example, I’m placing a 3D object on a paper with a drawing, and when I move the paper around, the object should stick to it. But it can be any drawing, not some predefined target image. It already works like this with a plane tracker, the only problem is that it works if I move, but not if the plane itself moves.



According to the documentation, there is a MOVING_OBJECT option inside the tracking mode ENUM ( that could be what you’re looking for? You can access the enum through the scene module, I think, and then declare that the tracking mode you want for X object on the scene is this one (you can find some good tutorials on yt, but this might be a good start).
But bear in mind that vertical_plane, for example, simply does not work anymore. So you’d have to try and see if the moving_object one is still a thing – fb does not seem worried about retrocompatibility so they just… stop using things on updates.

4 People found this is helpful