Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: unearthly on June 30, 2017, 05:50:06 PM

Title: Make player invisible to an enemy's raycast behind tall grass
Post by: unearthly on June 30, 2017, 05:50:06 PM
Hi,

As the subject line reads I want to make the player (first person) invisible to an enemy's raycast (vision) behind tall grass. I have the enemy raycasting set up and all is working, accept he can see me through thick high grass.
There are probably simple solutions. Something invisible over the patches of grass that blocks the raycast?

Thanks in anticipation. Charles
Title: Re: Make player invisible to an enemy's raycast behind tall grass
Post by: djaydino on July 01, 2017, 05:44:41 AM
Hi, does the grass have a collider?
if not you can make it by using (for example) a cube, resize it to the grass size and then disable or remove the mesh filter and Mesh renderer.
Title: Re: Make player invisible to an enemy's raycast behind tall grass
Post by: unearthly on July 02, 2017, 04:11:43 AM
Hey DjayDino,

I haven't put a cube over a section of grass, just tested with a cube and while the enemy doesn't see me if I am behind the cube it's collider blocks me when I would want to enter it's volume (to go into the grass to hide).
Title: Re: Make player invisible to an enemy's raycast behind tall grass
Post by: djaydino on July 02, 2017, 04:31:55 AM
Hi.
Check 'is trigger' on the Collider component.
Title: Re: Make player invisible to an enemy's raycast behind tall grass
Post by: unearthly on July 03, 2017, 05:34:20 AM
Thanks again DjayDino.

Sometimes the answer is so simple it's astonishing :-[

This one is solved.