For the new Handheld AR template in 4.19, what drives the world origin when the app is run on the device. I can’t seem to figure it out. Sometimes it seems that the origin is placed at the device’s location when the app is started. Is there any way to reset the origin to a location after the app has run? Like click on a location and reset the origin to that location? Or click a button the origin is reset to where the device is currently located?
Now I’m experimenting with world alignment, but can’t figure out what transform should I provide to SetAlignmentTransform node. I’ve tried to provide inverse transform of a point (TraceResult) on tracked plane. This works for the first time. But then if I click at the different location on the same plane then world origin flies far away. And all the rest clicks move world origin into incorrect spots. The same problem occurs if I provide non-inverse transform.
Also I’ve noticed that GetLocalToTrackingTransform and GetLocalToWorldTransform nodes of a TraceResult object always return identical transforms whatever alignment transform is set.
Is it bug or did I miss something? Where the tracking space origin is located and how it relates to unreal world space?
Finally, I’ve managed to set world alignment correctly: https://youtu.be/LPw-Von1r2g
You need to keep current world alignment transform somewhere like in pawn’s variable (it is strange there is no GetAlignmentTransform node). It’s identity by default.
If you want to move your world origin to some spot, you should get inverse transform of that spot and compose it with current world alignment transform. See attached screenshot.
And as I said in the post above GetLocalToTrackingTransform and GetLocalToWorldTransform nodes of a TraceResult object always return identical transforms. I think this is bug. Because why do we need these two identical spaces?
Awesome. I haven’t had a chance to look into what you sent, but it seems like what I am trying to do is exactly what you showed. I’ll take a look and see if I can recreate it.
Thanks a load for the solution, you’re a star.
Is that first Branch coming from the World Hit Test and Input Touch?
**CGough, **sorry, do not remember. I guess it comes from Touch Pressed.
Btw, check out my progress in AR 4.19: https://youtu.be/Fvq6QnEFYkc
@plastik21 It’s Fine, It was, I just asked to cover any doubt but it seems to work just fine.
Your work looks great too, lovely helicopter and particle effects. It’s a wonder how much work goes into the blueprints and code before you can really make use of your good 3D work.
**CGough, **It took me about 2 weeks to achieve the scene like helicopter’s landing (the helicopter model was made by outsource artist and animated by me). I’ve started with no knowledge how to build iOS application on Windows platform, what are the limits of graphics on mobile devices, how AR works in general. But I have experience about a year in developing UE4 applications. Mostly blueprint projects. And yeah - google is the most valuable tool!
@plastik21 that’s looking great ! The plane visualization looks nice, along with way to manipulate it’s transform. Do you mind sharing the setup for the visualization perhaps ? Would save me the effort to actually look into it myself and I could return the favor by sending you out some beers
**Shin_ji, **what part of visualization are you interested in exactly?
Are you able to scale the world origin to scale the scene?
**Lutherbrian, **Unfortunately, I couldn’t find the proper way out of the box to scale the level except manually go over all actors and scale each of them individually. In my project I only spawn a single actor in level which basically is a mesh with sounds and particles. And then just scale the actor (SetWorldScale3D). It’s suitable for my project purposes. Indeed not fully - particles are scaled incorrectly - the size is scaled, but velocities are left the same. I guess I have to scale velocities as well and probably some other particle system parameters. So much headache
I’ve seen that Unity has this feature fully integrated, it doesn’t scale the scene but rather manipulates the camera actor to make it appear smaller so that the issues you are having with particles is non existent. Seems something that should be coming in future updates as it would be fundamental in creating an AR game.
@plastik21 your ar project looks cool. In your video it looks like you are also rotating the scene alignment. How do you do that? I tried it but is doesn’t work properly.
@plastik21 Perhaps try Set World Scale to Meters?
I hope its ok to Necro an old thread, I just wanted to say thank you to @plastik21 as your screenshot finally helped me solve this.
I wanted to set AR Alignment at players feet (assuming tracked plane is ground) and was going crazy. You are right it is very strange there is no ‘Get AR Alignment’.
Could somebody share whole screen of blueprint? im newbie and if i follow the pic still cant get the result
It help me a lot.
Bump if it can be done.
Was curious, and apologies for reviving the old thread…but when you say world origin, does it mean the transform of the placed/detected plane, or is it the transform of the level itself? So 0,0,0 inside a normal non ar game?
Thank you so much! I’m finally able to do it.
I really hope that the folks at Epic do another AR training video and explain a bit more on this topic.