[Solved] Mirroring Image Points when the sprite is mirrored

  • I've run into trouble with my platformer player. The player controller is a basic box sprite. There is an origin point on the right side of the box for a fireball attack so when the fireball is spawned it does not spawn inside of the player box.

    This is perfect when the player box is facing right, but when the player is facing left, the image point origin is still on the right side of the player box.

    Because of this, when the player shoots while facing left, the fireball is created inside of the box and not outside of the box.

    I tried to find a way to edit the origin as an action on my Left Arrow Pressed > Set Player Sprite Mirrored event, but I couldn't find any results. Can someone help me out here? I imagine this is a very basic, yet common problem for anyone who's made a platformer with projectile-weapons.

  • you could do it like this. Merry Christmas

  • I'm bumping because I fixed the problem and I thought I'd share it in case others might have the same problem.

    Thanks for making a demo, but it didn't fix it and I think that's due to me not describing the problem in enough detail.

    This is for a 2D Platformer-based game type. The trick is to make sure "Set Angle" in the Bullet Behaviors is set to "No", and mirror the bullet sprite when the player is mirrored.

    I hope this helps.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This works perfect, thanks!

    I'm bumping because I fixed the problem and I thought I'd share it in case others might have the same problem.

    Thanks for making a demo, but it didn't fix it and I think that's due to me not describing the problem in enough detail.

    This is for a 2D Platformer-based game type. The trick is to make sure "Set Angle" in the Bullet Behaviors is set to "No", and mirror the bullet sprite when the player is mirrored.

    I hope this helps.

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