How to Collide with NPC shows button, when clicked, opening a webpage in iframe

Hi, do any of you have any reference on how to do this:

When player is nearing an NPC’s collision box area, a button will pop up above NPC’s head.

When we hit the button, it will open a 2D screen opening a web page in an iframe in that 2D screen

Thanks for reading this up.

Hi @trisutridi,

For the first part check the following tutorials, it explains the concept of triggers to detect when an object enters a specified area:

https://developer.playcanvas.com/en/tutorials/collision-and-triggers/

1 Like

Thanks, will have a look