How to create proximity and listener?


i want to define the proximity of my player…i.e if something comes inside the proximity…he made action accordingly.

or we can say like this i need to implement a fellow(assistant) soldier of main player who continually follow the main player.

thanks in advance.

read this

you want to add an GhostControl to the player and check for Collisions with the PhysicsCollisionListener

upon impact you want to get the objects that overlap into the radius of the GhostControl

you may want to look at an example here