x

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"

How to do local rotation?

I recently started Unreal Engine, and from the start i seem to be having HUGE problems with local rotation. For 1 i don't know how to locally rotate the root component (rotate it for a certain number of degrees in it's local coordinate system). 2 how do i get forward/up/right vectors of the rotation relative to the root component (say Root component has R,P,Y rotation i want to get the forward vector of the actor that which has "Add Actor Local rotation" for say 30 degrees).

P.S. i have been doing everything in the blueprints.

Product Version: Not Selected
Tags:
more ▼

asked Oct 24 '14 at 06:53 PM in Blueprint Scripting

avatar image

Dreamhaxor
6 2 3 2

avatar image Overwatch04 Jun 30 '15 at 04:02 AM

Hope this helps...link text

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

2 answers: sort voted first

For anyone just wanting to add local rotation to a world rot value, you can go;

World Rotation Value -> Invert Rot -> Combine Rotator (Adding local rot offset) -> Invert Rot Again = Adjusted World Rot Value.

Very useful for calculating the adjusted world rot value of a spawned actor before actually spawning it, so you don't need to add Actor offset later.

more ▼

answered Mar 24 '16 at 03:45 PM

avatar image

bzxo
141 6 17 21

avatar image richst42 Jul 07 '16 at 10:18 AM

Thank you! just what I was looking for :)

avatar image HRuivo Oct 14 '16 at 02:52 PM

thank you so much! was having an hard time setting the physics handle target rotation correctly.

avatar image Andrew Heartnet Jan 23 '18 at 04:34 PM

wow thanks! This solved my riddles!

avatar image jamesfielddesigns Jul 26 '18 at 11:07 AM

This is a brilliant tip, thank you so much @bzxo

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

Root is the root of the local coordination system, meaning that everything is rotated/placed in relation to it. In the bluerints it doesn't say root but actor. So any transformation applied to the actor is applied to the root then passed on to the other components.

more ▼

answered Oct 25 '14 at 01:03 PM

avatar image

alperenakyuz
2k 62 24 111

avatar image Dreamhaxor Oct 25 '14 at 02:23 PM

but when i do set rotation, and add local rotation the root is unchanged, and when i want to know the rotation of the actor it returns the root's rotation.

avatar image S-ed Oct 25 '14 at 03:51 PM

Yeap, the question was, how to rotate something in local coordinate system (also called - relatively).

I know only one method - vector math.

avatar image Dreamhaxor Oct 25 '14 at 10:08 PM

it's able silly to be able to add local rotation relative to the root component but, not be able to rotate the root locally. if there was only a way to retrieve the rotation of the actor relative to the root component (in world coordinates) not just of the root component.

(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