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"

Ignore Roll when using SetWorldRotation

Hi guys.

So I'm using pawn with static mesh that can be moved with WASD and I also set another static mesh as a child from the first on top of it. Then I use FindLookAtRotation then I use SetWorldRotation to rotate the child so its always keep facing mouse pointer. Just like a Tank with the main body and as the parent and the rotating turret on top of it.

To make it look better I build a blueprint so the body(parent) will roll a bit to left or right when it turns. The problem is as I use SetWorldRotation for the turret(child) to face mouse pointer using only Yaw Axis as input, the other input like Roll and Pitch is set to 0.0 as default. This is preventing the turret to follow its parent roll as a child.So while the body is rolling to left/right, the SetWolrdRotation Roll axis keep setting the turret to 0.0 preventing the turret to follow parent roll.

If tried using SetRealtiveRotation instead but its not working. The turret did roll along with the body but as the body change direction, the turret no longer facing Mouse Pointer, is like its not using the turret forward Axis to FindLookAtRotation..

So I was wandering is there a way to set SetWorldRotation to Null instead 0.0 ? or maybe there is a way around it to solve this problem?

Product Version: UE 4.14
more ▼

asked Feb 09 '17 at 02:00 AM in Blueprint Scripting

avatar image

1 1

(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