Pop-up window under a hotspot

Otherwise the example of the hotspot is a good alternative, especially for a tooltip in a 3D world. You just have to modify the script to enable a text element when a hotspot is pressed and disable it after release.

Trying to rebuild lever.js of this project.

https://playcanvas.com/editor/scene/524858

I found a sample that will help me, but it was deleted,

Hi @Ivan_Stratiichuk!

Honestly, I would try a Textelement on a 3D Screen in world space instead of using CSS.

Check out this project:
https://developer.playcanvas.com/en/tutorials/world-space-ui-rendering-on-top/

:rocket:

Is that also possible for text @Sebastian? That would be nice.

Absolutely! Used it in my typing game. Check the vid:
https://forum.playcanvas.com/t/random-wip-bullshittery/12943/23?u=sebastian

:rocket:

Ah good to know. I will need that later when I continue to work on the UI in my game. Does it work the same way as with an image element?

Text and Image elements are pretty much comparable so, yeah :slight_smile:

So how do you do that for text? It’s not working at the moment…

Hi @Albertos,

what do you mean by “how do you do that”? Adding the text in 3d space?

Adding the no depth on text… :sweat_smile:

This sample project demontrates 3D text :slight_smile:

I think we have some miscommunication. The project you showed was a example of how to render an image on top of a world entity. I like to do that also with text. Thanks anyway. :upside_down_face:

Ha! No worries :slight_smile:

If you look at the project now, I added an extra text element on top of the cube entity. Sure it still needs a proper lookAt function but otherwise, it works :man_technologist:

What I mean is when there is an object in front of the text the text is still visible. Probably I have to add an extra camera that only renders the text.

@Albertos like this? ZTest of worldspace text elements

Yes, that’s it! Thanks! :grin:

Hi @Ivan_Stratiichuk,

You can listen for click events on your hotspots and then simply enable/disable a UI element for the popup.

UI examples:
https://developer.playcanvas.com/en/tutorials/?tags=ui

Please stop creating new topics for the same issue.

Hi @Ivan_Stratiichuk! Have you already tried any of the suggestions? If so, why is it not working?