Pitch,roll,yaw and Paper2d Question

Hello everyone,
I have created a sine and rotation A.I for my spider and this is the problem that i am facing.If i add a number bigger than 90 inside my rotation variable (pitch) then the spider flips on its axis while it rotates towards that number.sometimes it does that in pitch values larger than 130 or -130.it seems random.
Trying to investigate what is causing this i noticed that if i rotate my spider in the editor then the pitch value changes correctly up to a point and then the system adds roll and yaw as well and i believe this is the reason why the spider flips while it rotates.

Is this normal behaviour?Am i doing something wrong ?Why all these random numbers when i rotate my sprite? Thank you.

alt text

Hey -

You said you are using a sine function, are you making sure to take absolute vales so as to not get the 0 to -1 effect of the sine? The Pitch,Yaw, and Roll numbers are a known issue and will not effect the rotation, they just look funny in the editor’s tools.

Let me know if the absolute sine function resolves your issue -

Thank You

Eric Ketchum

Hello Eric,
I am afraid i did not understand where you want me to ABS the values so i decided to show you a few more pictures in hope that you will be able to help me understand what you are saying .

Here you can see the numbers on a random rotation placement of my spider.

This is the blueprint “logic” for my spider rotation.

This is the timeline.As you can see it is only one way starting from zero and ending in 1.

The construction script where i expose my rotation values to the editor.

Adding 180 degrees in the editor.

This is the debug mode where you can see the values and the spider “flip”

In my case isnt the problem the fact that the system feeds my start variable with the wrong values?
Thank you for trying to help me!

Hey -

There does seem to be an issue with rotation in Paper2D and I am reporting it to our developers. In the meantime, here is a work-around example for you to try where absolute values are set instead of a combine Rotator.

Blueprint: (Timeline is still 0 to 1)

Thank You

Eric Ketchum

Thank you Eric,
Is there a possibility for this to be fixed in 4.5?I don’t mind waiting a bit since i don’t want to spend any time redoing something that will work once the bug fix is out.If not i will try your method and report back.

Hey -

I cannot say with 100% certainty that this will be addressed and fixed by 4.5 but it is on our engineer’s radar.

Thank You

Eric Ketchum

Any updates?Has this been fixed for 4.6?

Hey -

In your original Blueprint use Lerp(rotator) instead of Rinterp and check use shortest path. This should fix the issue for you in 4.5.1.

Thank You

Eric Ketchum

Sorry here is a setup:

Words cannot describe how grateful i am for your workaround! Thank you so much.Finally no more flipping for my spiders! :slight_smile:

This bug makes me hate life

Awesome!!!