How to create this in BGE?

Hello everyone,

I’m new to BGE and because of my poor English, I don’t know how to search for it on the Internet. I hope someone could understand me and I’ll try my best to explain what I want.
I want to make sort of things like the small green dot in the image below that follow an object



This dot never changes its size on screen no matter the player is far or close from it.


It still remains the same size and always on top of other things in the game.
When the target object is no longer on screen, it’s still there and moves to the direction where the target object is.


So, has anyone got an idea to achieve this in BGE? I’d really appreciate.

What you gotta do is get the worldPosition of that thing you want to track, then get its screenPosition. Then you want to make a little green hexagon and convert the screenPosition value of the thing you are tracking to 3D coordinates and set the tracker to that position. To get distance, just use .getDistanceTo()

Thanks for the idea, but I don’t really get it. Can you represent it by Python or something else? Thank you!

Use a small object with the origin at the camera (but the mesh in-view of the camera), and then use the “track to” actuator.

1 Like