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"

Detecting if camera is upside down in material editor


Title pretty much says all, how can I check in material editor if camera is turned upside down? Camera Direction Vector alone does not provide enough information, I need to somehow get camera roll around its direction vector.

Thanks in advance.

Product Version: UE 4.12
more ▼

asked Jul 03 '16 at 02:06 AM in Blueprint Scripting

avatar image

7 2 2 5

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

1 answer: sort voted first

What you can do is use the Player Controller to update, trough Tick or other means, check your rotation (since I guess that will control your camera's rotation) and if that rotation is => 180 or <= -180 degrees then change a parameter in the material you wish to change.

For more information, check out "Dynamic Material Instance" and "Material Parameters"

Edit: Also if your Camera doesn't follow your player's rotation then you should create a new blueprint and choose Camera Actor, then you can have your rotation blueprint there.

alt text

answertohub.png (113.9 kB)
more ▼

answered Jul 03 '16 at 04:48 AM

avatar image

78 3 3 9

avatar image Mordraug Jul 03 '16 at 10:36 PM

I was hoping for more "universal" way, so I could reuse shader without additional bluprints, but that does it, thanks.

(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