Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: createasaurus on April 06, 2014, 03:47:22 PM

Title: Need player outline / shadow, when hidden behind geometry [Solved]
Post by: createasaurus on April 06, 2014, 03:47:22 PM
During gameplay, I need to know where my player is when he goes behind the level geometry and is hidden.  Other games sometimes have an outline, shadow, GUI arrow, or something that tracks a hidden player.  See example images of what I'm after.  My game is actually very similar to these sample images, just so you know what I'm hoping for.
(http://)

Any advice at all will be greatly appreciated.  Thank you!
Title: Re: Need player outline / shadow, when hidden behind geometry
Post by: escpodgames on April 06, 2014, 08:33:02 PM
You could fire a ray from the camera to the player and see if it hits collision.

There is a GameObject is visible action but I don't think it works like this (could be wrong)
Title: Re: Need player outline / shadow, when hidden behind geometry
Post by: createasaurus on April 07, 2014, 09:52:36 AM
Thanks LampRabbit!

I will attempt to implement.  It is my first time using a ray, so wish me luck!

It seems the basic idea should be: if camera ray dose not hit player, then toggle player outline layer on.
Title: Re: Need player outline / shadow, when hidden behind geometry
Post by: escpodgames on April 07, 2014, 05:13:13 PM
Basically yes, but remember that raycasts can get very expensive. So you might look at rasting a ray every 30 frames (for example) rather than everyframe as this feature isn't critical (I assume)