x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to make hide in bush function for a stealth game?

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: alt text

Here are the grass and flower models in my game: alt text

Because I also wish to mass paint it like a foliage, so I'm wondering what will be the best way to go for making this feature?

Product Version: UE 4.20
Tags:
more ▼

asked Nov 25 '18 at 01:16 AM in Blueprint Scripting

avatar image

FluffyArx
13 1 4 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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 codelikeme hide in bush

alt text

229.jpg (768.9 kB)
more ▼

answered Jul 30 '19 at 05:52 PM

avatar image

Thilina_arimac
41 4 2

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

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.

more ▼

answered Jul 30 '19 at 08:07 PM

avatar image

Jezcentral
442 10 13 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question