Detect objects in circle

Forums:

Hey there,

Love the framework so far, I'm using it for some research. However I'm wondering if it's possible to get all BeyondarObjects within an on screen circle? The idea is that all objects within this circle get listed on the bottom (it's like a reticule with a list of targets) I've attempted to use circle collisions based off a ray from the center of the circle, but what I've realised is that it doesn't really work for objects at a distance as the radius needs to be larger. Would this be possible to do? Or do I need to scale the radius based on the objects distance from the phone (I am trying to avoid this method as it seems pretty hacky).

Any help would be greatly appreciated.

Cheers.

Beyondar's picture

Hi BeardOfFury,

 

Sorry for the delay, I was having some holidays :)

I would recomend to iterate the geoObject and check the distance from the center of your circle. Using the World object and the method getBeyondarObjectLists()

Tell me if it helps

BeardOfFuryBeardOfFuryBeardOfFury

anvar1101's picture

Hi,

I need to increase the size of rendered object that is situated in center of the screen. 

1) How to define the central item?

2) How to increase the size?

can you help me with best approach

Best regards

Beyondar's picture
anvar1101's picture

It is possible to change the size of one of them and restore again if needed? (others have to save the sizes) 

Beyondar's picture

If you set the values to 0 it will set the distance to the default one. 

See BeyondarFragment.setMaxFarDistance and BeyondarFragment.getMaxDistanceSize