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"

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.alt text Is this normal behaviour?Am i doing something wrong ?Why all these random numbers when i rotate my sprite? Thank you.

alt text

Product Version: Not Selected
more ▼

asked Aug 27 '14 at 07:49 PM in Blueprint Scripting

avatar image

576 52 56 77

avatar image Roccinio Aug 27 '14 at 07:55 PM

alt text

avatar image Lovecraft_K ♦♦ STAFF Aug 27 '14 at 08:43 PM

Hey Roccinio -

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

avatar image Roccinio Aug 28 '14 at 10:18 AM

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 .alt text

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

This is the blueprint "logic" for my spider rotation.

1.jpg (164.2 kB)
rotation logic.jpg (467.9 kB)
avatar image Roccinio Aug 28 '14 at 10:25 AM

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.

alt text

alt text

timeline.jpg (75.1 kB)
avatar image Roccinio Aug 28 '14 at 10:29 AM

Adding 180 degrees in the editor. alt text

This is the debug mode where you can see the values and the spider "flip" alt text

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!

editor.jpg (147.8 kB)
blueprint.jpg (465.4 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Roccinio -

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)

alt text

Thank You

Eric Ketchum

bp_2drot.jpg (500.2 kB)
more ▼

answered Aug 28 '14 at 06:40 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.6k 703 260 737

avatar image Roccinio Aug 29 '14 at 02:59 PM

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.

avatar image Lovecraft_K ♦♦ STAFF Aug 29 '14 at 05:42 PM

Hey Roccinio -

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

avatar image Roccinio Nov 20 '14 at 08:19 PM

Any updates?Has this been fixed for 4.6?

avatar image Lovecraft_K ♦♦ STAFF Nov 20 '14 at 09:53 PM

Hey Roccinio -

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

avatar image Lovecraft_K ♦♦ STAFF Nov 21 '14 at 04:30 PM

Sorry here is a setup:

alt text

avatar image Roccinio Nov 21 '14 at 10:38 PM

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

avatar image NezzyGuda Jun 26 '15 at 02:38 AM

This bug makes me hate life

(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