I’m having a problem with the Physics behavior when mirroring the object.

Not favoritedFavorited Favorited 0 favourites
  • 3 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • The enemy spits a fireball. The fireball loads in the enemy's mouth, then gets released using "Impulse at angle" (like a dragon charging and breathing fire).

    I’ve used hierarchy to keep the fireball positioned with the enemy—even when the enemy moves, since the enemy can shoot while moving.

    The problem:

    - The fireball works fine when the enemy is in normal (non-mirrored) position.

    - But when the enemy is mirrored, the fireball goes in the wrong direction.

    Shoot Event:

    Error Video: webmshare.com/play/rOgwn

    I tried using an “Is mirrored” condition, but it doesn’t work well with multiple enemies—the Physics impulse action becomes inconsistent.

    Is Mirrored Event:

    Is Mirrored Error Video: webmshare.com/play/PJayR

    Please help me fix this.

  • I mean ignoring hierarchy, waits and such to have the fireball shoot one way or another based on if the enemy is mirrored could be simple as:

    Every 1 seconds
    For each enemy
    — enemy: spawn fireball at imagepoint “mouth”
    — enemy: is mirrored
    — — fireball: apply impulse at angle -30
    — else
    — — fireball: apply impulse at angle 180+30

    Anyways, the relevant part is the “is mirrored” check. And generally if logic works for one enemy but not consistently with multiple then you can put that logic under a “for each enemy” event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thank you very much!

    I will try this

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