Hello! I’m trying to make a hide in bush function for a stealth game. When the player is crawling in the bush the enemy can’t see you and when you stand up or craw out of the bush the enemy will see you.
Kinda similar to the hide in the bush in We Happy Few:
First you may have to use a different object channel to distinguish bushes from other collision objects.
Then you can use a custom depth based post process material to get the desired look when the character is hidden.
Finally, you have to modify the AI_Perception and enemy detection logic to ignore character inside a bush.
I have done couple of tutorials based on that topic .
post process material : [codelikeme outline mat][1]
[codelikeme hide in bush][2]
Just make a volume in each bush or get the location of the Bush and get your character to crouch within a certain distance of it. Then prevent the enemies from seeing the character with a Boolean.