Forum rules - please read before posting.

Should GetSpriteAngle() be linear ?

Hello,

For the animation of my character with SpriteUnity Complex 2D, I am currently working on a script using the GetSpriteAngle() method. I do not understand its behavior well, as the value change is not consistent when I use the rotation (turn before pathfinding), and my script cannot function properly because I need a linear rotation movement over time. I cannot find any options to enable or disable that would make FacingAngle consistent.

According to this discussion thread, https://adventurecreator.org/forum/discussion/11458/2d-turn-speed-consistency, I read that turning speed should be linear.

I tried it in Demo2D using Brain2D_SpritesUnityComplex, and the random behavior of FacingAngle is the same as in my project. By reducing the Turn Speed value to 1 in Movement Settings, one can clearly see that the FacingAngle slider in the blend tree changes speed randomly or sometimes strongly decelerates at the end of a rotation.

Am I missing something, or is this a mistake ? Thank you for your help.

Comments

  • What are your AC and Unity version numbers?

    The turning should indeed be linear. I've followed your steps of using the 2D demo assets, but I'm having trouble seeing the problem occur.

    Are you able to create a new Cutscene in the 2D Demo scene that demonstrates the issues? If so, please PM the updated scene file and I'll take a look.

  • In fact, I am on the latest version of Unity for Mac 2021.3.21f1 and AC 1.76.3.

    Upon re-reading, I think I have the same bug as the one mentioned in the previous conversation.

    Just in case, I launched the project that I am sending you on my Windows system, and I noticed that the problem persists. I added a cutscene (SpriteAngleTest) after Intro2 to move the character. The most significant slowdown occurs during the action list (11) Character: Move to Point.

    I am sending the zip file to hello@adventurecreator.org. I hope this can help. Thank you.

  • And sometimes during action (7) Character : Move to Point, it's random

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.