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"

Location based, cylinder shaped opacity mask that always faces the camera and only masks faces that are facing away from the player character.

I have three problems I need to solve. I am trying to make a opacity mask that is in the shape of a cylinder with the other end pointy and the other flat. Both of the ends are pointy right now. The cylinder should rotate to always face the camera and apply the opacity mask to faces that are facing away from the character. It should always reveal the player if he goes behind any object with the material attached to it, no matter how far away he is or how many objects is in between the player and the camera. A simple sphere doesn't do the job since it can't mask all the objects that are in between the player and the camera: a long cylinder would do it.

The opacity mask is in the shape of this right now, always positioned around the player, but doesn't rotate to face the camera. alt text

Round shape of the cylinder. alt text

This cube face shouldn't be masked, since it is facing the player. alt text

This is how I create the opacity mask shape from a world position. alt text

This is how I get the player position and translate that to either be closer or further away from the player. alt text

BONUS: How would I make the opacity masked materials still cast a full shadow, even if parts of the textures are inside the opacity mask?

Product Version: UE 4.9
151241.jpg (623.4 kB)
131415.jpg (309.2 kB)
w4525.jpg (405.8 kB)
shserge.jpg (387.3 kB)
more ▼

asked Sep 26 '15 at 03:55 PM in Blueprint Scripting

avatar image

6 1 2 5

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

0 answers: sort voted first
Be the first one to answer this question
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