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
Should not be as difficult as it sounds.
-
Convert mouse location to World Space (Get player controller first)
-
Get Bone Location by Name (Head Bone Name) (Target is Skeletal Mesh Component)
-
Find Look At Rotation:
a) Start = #2 Return Value
b) Target = #1 Return Value -
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…
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?