I’ve attempted to implement something similar, but my efforts haven’t been successful. I’m struggling to make progress and could really use some assistance. Could anyone help me out?
The part of the Ui i try a 3D UI but the indicator does not was fixed at the objective point, try to render in world and ui layer and so on… I’ve created the objective system, but the ui part is not good
The objective indicator is done, but i’m having problems to show the distance of the objective to the player… This is happening because the way i found to create the objective indicator’s not using the ui system…
If you use postUpdate instead of update you get a more smooth result.
When the target is behind the camera, the indicator is not visible. I remember now, I personally also wasn’t be able to get the indicator on the right position when the target was behind the camera.
It currently doesn’t work correctly on a mobile device with Device Pixel Ratio enabled. Personally I always enable this option in the project settings, to get a good looking project on mobile devices as well.
Thanks for the advice! I’ve switched to using postUpdate as you suggested, and it’s definitely giving smoother results.
Regarding the indicator visibility when the target is behind the camera, I’ve tried clamping the position to create an imaginary circle around the player. While it hasn’t fully solved the issue with objects behind the camera, I believe this approach has potential—it just needs some refinement.
As for the Device Pixel Ratio could you guide me on how to enable this? I’m still quite new to PlayCanvas
I expect the indicator to be on the bottom of the screen when the target is behind the camera. Basically the same as when the target is in front of the camera, the indicator is on top of the screen.
You can enable this option in the project settings.