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"

Head Rotation

How do i rotate my head when i move my mouse?, i've watched a lot of videos online but i can't seem to figure it out

Product Version: UE 4.16
more ▼

asked Jul 13 '17 at 03:08 PM in Blueprint Scripting

avatar image

1 1 2 1

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

1 answer: sort voted first

Should not be as difficult as it sounds.

1) Convert mouse location to World Space (Get player controller first) 2) Get Bone Location by Name (Head Bone Name) (Target is Skeletal Mesh Component) 3) Find Look At Rotation: a) Start = #2 Return Value b) Target = #1 Return Value

4) Event Tick --> Set Bone Rotation By Name a) **Bone Name should be the same as Bone Name in #2 b) Target = Get Skeletal Mesh c) In Rotation = #3 Return Value

Note: You may want a Branch between Tick and Set Bone Rotation... or it will always update the head rotation. Maybe create a boolean variable for "Is Looking Around" or something and turn it on and off by a key.

Of course this may be oversimplified, too...

more ▼

answered Jul 13 '17 at 07:44 PM

avatar image

1 3 5 5

avatar image alwynd Dec 19 '17 at 06:44 AM

Should the Set Bone rotation by Name perhaps be done in the animation blueprint So that it runs as part of the animation pipeline, or does it not really matter?

(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