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
asked Jul 13 '17 at 03:08 PM in Blueprint Scripting
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...
answered Jul 13 '17 at 07:44 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here