Image Point Moves on Mirror

0 favourites
  • 10 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • I have hair that I'm pinning to a character's head at a specific image point. It aligns perfectly when facing right. When I mirror the character and the hair to walk left, the hair is offset by 10 or so pixels on the X (no offset on the Y).

    I tried resetting the position of the hair to the image point to try to override it in case movement shifted it slightly, but it stays the same. When the character goes right again, it mirrors back to the perfect alignment.

    It seems like the image points don't mirror perfectly. Has anyone else run into this? I saw a thread from 2 years ago about it, but it was using old terminology and didn't have a conclusion...

  • Image points do mirror properly, but the pin behaviour doesn't update upon mirroring. So when you mirror the character, you need to update the hair's position and pin (and probably mirror it, too).

  • GeometriX I did update the hair's position and even tried unpinning and repinning, but I get the same results. When you say update the pin, is there a way to refer specifically to the pin? Like Hair.Pin.X or something?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Did you mirror the hair too?

  • ramones hair is definitely mirrored. Steps:

    onwalkright: (works)

    set human = !mirrored

    set hair = !mirrored

    onwalkleft: (offset issue)

    set human = mirrored

    set hair = mirrored

    Later tried:

    onwalkleft: (still offset)

    set human = mirrored

    set hair = mirrored

    set hair to human position at image point

  • Sorry, by update I mean apply the pin (and position) again.

    Example capx.

  • GeometriX Weird. That is the exact set of events I'm using. It's just not working for me.

    Here's the capx.

    Check out the "Idle" and "MirrorAccessories" functions on the Pathfinding Event sheet. The hair is random, and no hair is an option, so if you don't get any, just restart.

  • But you weren't updating the pin and position when updating the character facing left or right.

    I did that, but then the hair was in the wrong position and I realised (after too much fiddling :P) that you didn't have image point 1 on the walking animation, so I created that too.

    Updated capx.

  • GeometriX wow. thanks a ton for going to that effort! i forgot i reimported the walk and it cleared the image point for that. i'm not sure i understand why the hair needs to be re-pinned... it's already pinned. I thought setting the position was all that was necessary...

    Thanks again.

  • Yeah, I don't get it either. In isolated testing, redefining the position of the pinned object has zero effect (since pin is basically "set position every tick", so it can't be overridden), so it's not like that's what's buggering up the behaviour.

    But then, you shouldn't be able to reposition the object at all, in that case.

    It must be the mirror function that causes this hiccup, but I don't know if it's a bug or just a result of the the way that the function works.

    In truth, I think I've confused myself now :P

    Perhaps Ashley or someone else more familiar with things could shed some light on this?

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