No announcement yet.

Spawn ARActor without touching the screen?

  • Filter
  • Time
  • Show
Clear All
new posts

    Spawn ARActor without touching the screen?

    In all AR examples to spawn an object in a world position they touch the device's screen to detect if there is an AR tracked object detected by the device's camera at that location.

    But my intention is to spawn an object in a position for example a few meters away on the ground without touching the screen.
    Assuming that the device has already tracked objets in that position (planes), I cannot find a way to spawn an actor in that position where there is a tracked object.

    I have tried the following function, giving the player's location as a starting point and a location a few meters from the player as the end point. Nor with good results:

    I've tried using the GetAllARGeometries (getindex 0) but sometimes it positions the new Actor at different heights, rather than at ground level.

    Any tips? Greatings.

    Maybe using the center of the screen as a starting point can work:

    Click image for larger version

Name:	spawn.PNG
Views:	11
Size:	90.5 KB
ID:	1794945