Forum rules - please read before posting.

y rotation of 2D characters

Hey there,

I'm currently implementing character animations into our game and I'm having a problem with the rotation of 2D characters. I'm using the Unity2D movement and turning settings, character turning is off. Moreover, I'm using the Sprites Unity Complex animation engine.
When moving the character, the y value of the rotation changes. One cannot see any rotation on screen, but the value changes. And this is a problem since I'm implementing Puppet2D animations and they need to have a y rotation of 0 (or 180, when being flipped). As for now, I can't flip my character due to the y rotation that's being caused by Adventure Creator. 

I'm currently looking into the code, searching for the part where the 2D character is rotated, nut had no success so far. Any help? :)

Thank you!
Marcus

Comments

  • Look for the UpdateSpriteChild function in the Char script.  AC works on the basis of the "base" Player/NPC object rotating to face the correct direction, and the sprite (which must always be a child) is then rotated to face the camera at all times.  You may need to bear that in mind when writing a controller.

    A tutorial about custom character controllers, if you need it, can be found here.
  • edited February 2015
    Thank you!

    For everyone who's having the same problem: I wrote a script that just manually rotates the sprites 180° (in addition to the rotation that causes the sprites to face the camera) when the Puppet2D rig is being flipped and now everything is working as it should be :)
  • HI!

    I just started using puppet 2D and I'm trying to work out how to make the animations show!

    This is the only thread I can find that mentions puppet, can you tell me what I should be using to set up / display the animations?

    Thank you!

    Kris
  • I just saw your comment. We're not using Puppet 2D anymore, but I have old project files somewhere on an external hard-drive and can have a look at how we did it. Can you tell me if you still need the info before I go search the files or if you already figured it out?
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.