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"

Multiple Rotations On Mesh?/Snap Relative Rotation?

I have a blueprint that sets the relative rotation of the mesh on an rLerp what I'd like to do is have this mesh rotate multiple times past 360, when I do this currently the rotations freak out since they seem to go from -360, 0 , 360.

The reason for this is because I have animations for a game where the character does tricks in the air and some tricks end up facing the opposite direction and the character enters a reverse stance they can then skate/move with until they do another trick etc.

The problem is some tricks call for multiple rotations 540, 720 etc so I'd like to know how I can rotate multiple times without the rotations looking buggy.

Another solution I had was to animate the rotation and then have a anim notify to snap to the desired relative rotation essentially giving the illusion through the animation. Once the notify is triggered though the rotation is very apparent as it quickly rotates from its original rotation to the desired. I'd like to know if I can just snap to the relative rotation.

This could very well be because of the animation though but I'm not sure.

Thank you any help would be appreciated!

Product Version: UE 4.21
more ▼

asked Jun 06 '19 at 02:18 PM in Blueprint Scripting

avatar image

73 2 4 8

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

1 answer: sort voted first

Have a look at this post, the timeline is rotating the cube in relative space multiple times:

vid: https://i.gyazo.com/910f728122c5a1212cb65a2d63e85b34.mp4

more ▼

answered Jun 06 '19 at 02:37 PM

avatar image

15.2k 77 25 62

avatar image Jinkuu Jun 06 '19 at 05:30 PM

This is along the lines of what I want. One of the problems though is when lerping I use the meshes relative rotation as A so if I were to lerp to -360 etc it would freak out like before is there a way to solve that?

Also is there a way to specify the amount of rotations?

avatar image Everynone Jun 06 '19 at 05:47 PM

The example is also using relative rotation.

Also is there a way to specify the amount of rotations?

Look at the Lerp (rotator), the one with the one flip comment - it currently reads 360 - one flip, it should work with multiples of that just fine.

Since it was an example about using a timeline rather than lerping rotations, it is quite basic and does not currently account for non-360 rotations, but that can be added easily. Doing 540 is doable but the timeline will restart from 0 next time it executes; you'd need to store (modulo) final rotation before setting it as current rotation for the timeline.

avatar image Jinkuu Jun 06 '19 at 06:09 PM

I meant that I'm getting the meshes relative rotation variable and plugging that into "A" on the lerp rotator and this is what causes the rotation to freak out.

I'll see what I can do with what you told me so far thanks.

avatar image Everynone Jun 06 '19 at 06:12 PM

Show a screenshot in case you can't get it to behave. Are you using a timeline for this or?

avatar image Jinkuu Jun 06 '19 at 07:26 PM

alt text

capture.png (98.6 kB)
avatar image Everynone Jun 06 '19 at 07:31 PM

For the timelines it's much better to prepare the data ahead of time. Create a rotator variable and Set it to the mesh's relative rotation before firing timeline's Play From Start. And use that variable as A.

Otherwise, you're end up with inconsistent interpolation as the A value the alpha is sampling is constantly changing.

avatar image Jinkuu Jun 06 '19 at 08:52 PM

Thank you! setting the variable before worked, I appreciate the help.

(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