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"

Need help with rotating a skeletal mesh bone so that it is facing a certain direction.

So i have been trying to make it so that my AI can look around at various objects in the world but i have gotten stuck trying to rotate the head bone of the skeletal mesh to the rotation which points at the object. The issue i'm having is that when i try to rotate the bone using the Transform (Modify) Bone the various, pitch, yaw and roll values affect things they should not. Also when putting in a zero rotator the head does not look straight forward. I'm not really sure what i'm doing wrong and this feels like it has a simple solution. I'm using the pre 4.8 skeletal mesh that was included in the third person template.

I will try to explain what is happening. This is the animation blueprint when i put in (0.0, 0.0, 0.0). alt text

And these are some other values to show how the head rotates.

(90.0, 0.0, 0.0) http://i.imgur.com/QOk5CRt.png

(0.0, 90.0, 0.0) http://i.imgur.com/BzSK1E8.png

(0.0, 0.0, 90.0) http://i.imgur.com/FcTmby3.png

(90.0, 45.0, 0.0) http://i.imgur.com/XbF9fAj.png

(90.0, 0.0, 45.0) http://i.imgur.com/R6kz3KQ.png

Can anyone explain why the rotations are so weird or how i could fix it? I can't for the life of me figure out how to make the head rotate to look at objects when these rotations act like they do.


Still haven't figured out how to make the AI correctly rotate it's head. This is the code that creates the rotation that is used to rotate the head. MostInterestingPoint is the location that the AI should look at.

 if (!MostInterestingPoint.IsZero())
     FVector TempVec = MostInterestingPoint - ControlledPawn->GetMesh()->GetSocketLocation("headSocket");
     LookAtRotation = FRotationMatrix::MakeFromX(TempVec).Rotator();

Any help would be greatly appreciated as i cannot figure out how i should do it.

Product Version: UE 4.8
more ▼

asked Aug 16 '15 at 09:52 AM in Using UE4

avatar image

200 54 54 64

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

0 answers: sort voted first
Be the first one to answer this question
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