Stop objects from "merging"...?

  • Hi guys.

    I have platformer AI where the characters need to be able to go through each other, but one of the problems I'm facing is that they will bunch of against a wall when cornered by the player because they are trying to run away.

    The problem here is that several of them appear to become a single entity and it's very hard to split them apart even if the player leaves and they resume their mostly random movement.

    Does anyone know of an easy way to fix this issue? I'm using the platform behavior for their movement.

  • You could add the solid behavior to them

    Or , you could disable platform behavior when overlapping and re-enable it when not overlapping

  • You could add the solid behavior to them

    Or , you could disable platform behavior when overlapping and re-enable it when not overlapping

    Thanks for the advice but neither of those really help me.

    The objects have to pass through each other because they patrol left and right via platforming. If I disabled the behavior of them when overlapping they would simply stop moving when they passed through each other.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could create an invisible object on each wall (1-pixel bigger than the wall on the side of the enemies ) that , on collision with enemy while they are running away from the player , set the enemies platform disabled , and the wall width is set to wall width + enemy width , and when the player is far enough , set the wall to it's initial width and set the enemies platform enabled

    I hope this give you an idea !

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