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 can i get my material on an object to look at the camera

I have done a lot of researching into this to try and find an answer and I can not find anything I imagine its hopefully more simple than what I think but basically I have a table asset with a big Eye on the front of the table the table and the eye are one object but use separate materials my aim is to basically make the eye material look at the player whilst they move around the room hoping this can be done by some sort of rotate material system or something but I cant work out how Thank you Please Help!alt text

Product Version: UE 4.18
Tags:
maindeskeyemat.png (356.2 kB)
tablecloseup.jpg (392.4 kB)
more ▼

asked Jan 07 '18 at 11:05 PM in Using UE4

avatar image

xcorrosionx
1

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

1 answer: sort voted first

Hey there, you can do that easily if you separate the eye from table. The basic idea is that on every tick you'll get the direction from the eye to the player, you do that by subtracting the player's world location with the eye's world location, that will give you the look at direction vector. After that you call Rotation from X Vector to get the corresponding rotation. To finish it off you need to set the eyes component rotation with Set World Rotation to that value and it should work.

more ▼

answered Jan 08 '18 at 10:27 AM

avatar image

xlar8or
6k 161 129 304

(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