AR Alignment Transform by Camera Locals

Hi all,

The title might be a bit vague but I currently can move my AR scene by the “Set Alignment Transform” node but it’s only in world space, so once you move around the side of the scene your transforms become unaligned, left and right become forwards and back at the sides etc.

Is there anything I should look at to set the alignment by the camera position? I can get the camera world transform but I’m at a loss as to what to do next.

Many thanks for reading and I can try to elaborate if need be.

If I’m understanding your issue correctly, this forum post might be useful, https://forums.unrealengine.com/development-discussion/vr-ar-development/1444157-handheld-ar-world-origin. If you look at the blueprint network image in post #4, you’ll see that he is using a line trace to cast a ray from the center of the screen to the tracked AR plane. He is moving the world origin to this point on the plane, but (here’s the part I think might help you) at the bottom of the node network, notice that he gives the hit point transform a new rotation based on the camera’s world z-rotation. This effectively leaves the world origin z-axis pointing straight up, perpendicular to the AR plane, but rotates it to align to the camera. If you needed to have your world always aligned to the camera in a certain way, you could do something like this on every tick.

Ha! the funny thing is I actually commented on that thread months ago but used the blueprint differently. Thanks for pointing back out.

Hi again.

Looking back at the blueprint I have a new one set up that on finger touch it does a sequence, the first is the same as the above mentioned BP network that sets the origin transform to the camera view, then uses my touch input to mode the scene about, pan left/right, forwards/back and rotation.

This is fine but every touch makes the scene jump back in from of the camera, I think I just need to make my world movement local to the camera without reseting the origin each time I touch.

I’ll have to post an image of the BP I have, it’s rather hard to explain.

Hi CGough,Can you share a copy of your BP? I had the same problem.