Hotspot Issue

Hi hope you all are fine , I just want help like the hotspots to appear when the player gets near them and disappear when the player moves away. If there is any example with FPS or third-person controller then share it with me thanks.

I’m using the hotspot project link but It’s getting difficult to add it with fps or a third-person controller

PlayCanvas 3D HTML5 Game Engine

Hi @HasnainX!

Can you tell a little bit more about the use case please?

If your are looking for something basic, I would use an entity with for example an element component and give it a script to make it look at the camera entity. You can enable and disable the entity based on the distance to the player or using a trigger entity.

Thank you for the reply, Alberto. So I’m using a third-person controller and I want to enable a hotspot when my character approaches another character then the hotspot should be enabled, just like similar to the spatial example.

I think my suggestion or the example project are fine for this. You just need to enable and disable it based on the distance to the player or using a trigger. Unfortunately, I don’t know an example project so you need to give it a try yourself.

I think there is only way to do it via trigger