Start a new topic

Get point in front of the user

Get point in front of the user


I'm currently using the Wikitude SDK and I want to get the marker directlyvisible in front of the user.

I already know how to get the visible marker on my screen but I don't know how to get the front marker when I have two markers on my screen.

Somebody has got a solution ?

Thanks in advance

Hi there!

Assuming we're talking about AR.GeoObjects, I recommend to use distanceToUser-function of its AR.GeoLocation. That way you know which marker is the one closer to the user and therefore also in front of all the others. The scenario where there is more than one marker "in front of the user" is kinda special. You may then use e.g. crosshair approach for selecting the marker in center screen.

Best regards,

Hi, I already see the distanceToUser function but I don't think it helps me.

See this picture :

<img src="">image</img>

Three markers are on screen. Maybe marker3 is near the user, but I want to select the marker1 because it's the direct marker in front of me.

Ideas ?

Thanks Andreas for your reply

Hi again!

Unfortunately there is no feature in place that solves your requirement but you can find out how many markers are visible and introduce the crosshair in case more than one marker is on screen (hide/show crosshair and enable/disable autoSelection accordingly)
Login or Signup to post a comment