How to render gui attached to objects far away?

Hey everyone!

I want to track objects with some GUI, even when very far away (like multiple light years far away).

The thing is, the gui does not render when the object it is attached to is further away than the far plane.

I tried using alwaysSelectAsActiveMesh on the object to force it to render but the GUI was not displayed still:

Is there a way to force it to render?

Hello :slight_smile:

A few days ago I had coded this Playground which computes a custom version of the linkWithMesh function, maybe you can inspire from that.
Since it’s based on “manual” projection (3D pos → 2D pos) it will render whatever the distance.

[EDIT] : Above playground is computing 2D bouding box to have the 2D pos fitting the object size. You would stick to a Simpler Version in your case, with just a direct projection


1 Like

looks good to me! There is a small lag though, I am not sure why :thinking:

I will use your solution if there is no native way of doing it in the engine :wink:

1 Like

Indeed there is a bit of a lag, I suspect that it comes from updating the 2D and control.left param…

Otherwise (until a dev gives the right way :grin: ) here is another trick : Playground
No projection, I only attach to an empty node which is between camera and mesh (1 distance in front of camera)


That’s a good trick haha and no lag as well :ok_hand:

I went for this transform trick and it worked like a charm! I will mark this as solved

1 Like