Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: heavygunner on November 21, 2018, 10:56:34 AM

Title: Dynamic Indicator above Player
Post by: heavygunner on November 21, 2018, 10:56:34 AM
Hi !

I wanna put a small Red Indicator above Player like this screenshot.
It should find object with tag "Money", then should get it direction and turn towards it every frame dynamically. This indicator will be child of Player & will travel along with player.

If is finding Object and Getting the Location. But, when I activate Smooth Look at direction, It's going out of view too far. How Can i get it done?
Title: Re: Dynamic Indicator above Player
Post by: djaydino on November 21, 2018, 03:06:31 PM
Hi.
I am not exactly sure what you mean, maybe you can show the issue in a video?

Maybe you can try Vector3 Rotate Towards?
Title: Re: Dynamic Indicator above Player
Post by: heavygunner on November 21, 2018, 05:10:41 PM
Hi.
I am not exactly sure what you mean, maybe you can show the issue in a video?

Maybe you can try Vector3 Rotate Towards?
Hi !
I passed that issue for now and working others. Take a look at this picture. It's showing off screen target indicators. I also wanna show a indicator above player.
Title: Re: Dynamic Indicator above Player
Post by: jeanfabre on November 21, 2018, 11:31:40 PM
Hi,

for this,I would so this.

get the screen position of the ennemy, it will be off screen, then find the intersection between the line [Screen center - Ennemy] and the border of the screen. you will likely need to get the angle of the line to know which side of the screen it should be shown.

your drawing makes perfect sense, and you should base your logic on this. you will need to learn about line intersections algorythm though: https://stackoverflow.com/questions/4543506/algorithm-for-intersection-of-2-lines


Bye,

 Jean