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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

How to get the forward vector in a material?

The only thing I can find is object orientation and that is only for the up vector. Or am I missing something here?

Setting the forward vector through a dynamic material every tick inside the material would be not a workaround here since that is beside the point of what I'm trying to do.

Product Version: UE 4.11
more ▼

asked Jun 22 '16 at 12:39 PM in Using UE4

avatar image

930 99 147 199

avatar image Slavq Sep 06 '16 at 04:14 PM
  • I have the same question, any progress on this one? :)

avatar image Davision Sep 07 '16 at 12:45 PM

I ended up importing all the meshes I needed it for rotated in a way so that the forward vector becomes the up vector. It is a silly workaround but as long as you only need the forward vector it works that way.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Why not just local to world transform ? If you want object X axis as forward, you could do this: alt text

more ▼

answered Sep 07 '16 at 02:16 PM

avatar image

7.8k 130 30 292

avatar image UnexpectedSquirt Oct 01 '17 at 02:20 PM

This method does not appear to work on instance meshes...

avatar image Deathrey Oct 01 '17 at 11:30 PM

It does, but only in vertex shader( you need to pass the expression on the image above) through interpolator node or custom UV).

(comments are locked)
10|2000 characters needed characters left
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