Announcement

Collapse
No announcement yet.

[ARKit - iOS] How to change AR Pawn location relative to the world?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [ARKit - iOS] How to change AR Pawn location relative to the world?

    Hello,

    The AR application I am developing has a big map (in real life measurements, probably around 100x200 square meters). It is filled with items (walls, buildings etc) but the floor is transparent (the player can see their phone camera's view through the floor).

    The first problem is that I tried implementing the touch controls (default joystick) in order to get the axis input. I got this working. Then I tried to use this input to move the AR pawn in order to move around in the real world (using Session Type World). Doing this, had no effect. Then I quickly discovered that since I am using positional tracking, the pawn's location (or is it actually the world?) is overridden every frame. Then I tried to set the session type to Orientation only. This also had no effect. Manually moving the pawn was still impossible.
    Is there any way to use the joystick in order to move around the map? Do I need to move the whole map instead of the AR pawn? Would I need to set the world position every frame?

    The second problem is quite similar. I thought about implementing a standard mobile 3rd person controller in order to move around, and switch to AR mode whenever desired (and back to 3rd again). However, if I disable AR mode and re-enable it, the world origin gets kind of reset. What I would like to do is to move the AR pawn where-ever the 3rd person controller last was in the map.
    Any ideas how to accomplish that?

    Thank you!
Working...
X