Mirroring messes up Sine behavior of hierarchy children

0 favourites
  • 4 posts
From the Asset Store
Add emotion, innocence, joy and cuteness to your video game with these 15 songs and 9 SFX
  • Hello,

    Please check the attached c3 file. Clicking "Mirror" button will trigger the problem.

    Is there a way around that ?

    Thank you.

    Tagged:

  • The main issue is that your sprites are rotated. You can select the lower leg sprite for example and mirror it in the layout editor - set width to negative value. You will see what happens to it.

    You will need to rotate the images in some external editor and set their angle to 0 in Construct.

    Also you need to disable Sine when the hierarchy is mirrored.

    Here is an example:

    dropbox.com/scl/fi/rhek2x89kjxmqzgxofrl8/test-mirror2.c3p

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The main issue is that your sprites are rotated. You can select the lower leg sprite for example and mirror it in the layout editor - set width to negative value. You will see what happens to it.

    You will need to rotate the images in some external editor and set their angle to 0 in Construct.

    Also you need to disable Sine when the hierarchy is mirrored.

    Here is an example:

    https://www.dropbox.com/scl/fi/rhek2x89kjxmqzgxofrl8/test-mirror2.c3p?rlkey=gxnmbm5x4hlbqdd4um0mv4xlk&st=1skir0ja&dl=0

    Thanks a lot!

    That is a viable solution. But what if we prefer to keep the original sprite orientation? I found that we can offset the angle somehow (i.e. as if it was rotated in the sprite editor) by using Set Angle = -Self.Angle, but it works only for the arms and hands.

    dropbox.com/scl/fi/tqlbp3wewbwd9i8tokewh/test-mirror.c3p

    Thank you.

  • But what if we prefer to keep the original sprite orientation? I found that we can offset the angle somehow

    I don't know, it may be possible.

    Another option is to create two versions of the skeleton in the editor - normal and mirrored. Configure them as templates. And when you need to mirror it - destroy one hierarchy and create another in its place.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)