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"

Set actor's local rotation

Hello mates, as title suggest, how can i change and set actor's local rotation? I have notice that there is a node name AddActorLocalRotation, that is a nice node but if i want to rotate an actor around it's axis for an exact of 45 degrees and then stay like that, AddActorLocalRotation node is pretty hard and tricky to use. Thank you all in advance

Product Version: Not Selected
Tags:
more ▼

asked Dec 30 '14 at 08:46 AM in Blueprint Scripting

avatar image

CKong
874 27 18 49

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

4 answers: sort voted first

Hey CKong-

There are a couple of simple solutions depending on the kind of effect you want. The first would be to use AddActorLocalRotation as you are, which gives a sort of "snap into place" effect as the actor's rotation updates instantly. Another option, which gives a smooth transition between the current rotation and the new rotation is to use Set Relative Rotation along with a timeline and a LERP node. The LERP node controls the transition from one position (A) to another (B). By setting a timeline with a float track from 0-1 (or whatever duration you choose), you can wire that value to the alpha of your LERP. Using a variable to get the current rotation of the actor (set in the construction script), you can break that into its pitch, yaw, and roll components. Wire the axis you want to rotate on to the A of the lerp and the amount that you want to rotate by to the B. Use the return value of the LERP to make a new rotation that gets wired into the Set Relative Rotation node. You can then wire the Update exec pin of the timeline to the Set Relative Rotation. If you want it to be able to continue rotating along that axis you just need to wired the Finished pin of the timeline to Set variable node for the variable storing the initial rotation. This way when it finishes updating, the new rotation becomes the starting rotation for the next run of the timeline. This screenshot should help explain how to set the nodes up inside your blueprint.

alt text

more ▼

answered Dec 30 '14 at 10:36 PM

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

hi ! i guess "Set Actor Relative Rotation" node can help you , try this

for a simple example this blueprint add 45 degree yaw rotation to my Actor without changing world rotation :

alt text

untitled.jpg (93.3 kB)
more ▼

answered Dec 30 '14 at 12:28 PM

avatar image

Gentleman72
67 12 15 21

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

In blueprints there is the "Set Actor Rotation" function. That should do it.alt text

more ▼

answered Dec 30 '14 at 09:14 AM

avatar image

KleinerBaer
11 1 2 4

avatar image CKong Dec 30 '14 at 10:13 AM

Sorry mate, i have try your suggestion but by far, i can only set actor to rotate around the world axis, while what i need is to be able to set actor's rotation around it's local axis. For now, i am using AddActorLocalRotation node and work around it, not a pretty solution but it somehow work.

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

Hello CKong! I recommend you to use text like "set *" for context sensetive search

For example "Set rotation" will show you setting of Absolute(Set World Rotation) and Relative(Set Relative Rotation) to parent rotations.

Also, you can use "Rotation" in search to show every node with "Rotation" like getters/setters and offsets alt text

untitled-3.png (99.9 kB)
more ▼

answered Dec 30 '14 at 01:27 PM

avatar image

zeOrb
267 24 19 25

(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