Problem: platform objects overlapping with solids

0 favourites
  • 6 posts
From the Asset Store
Now you can drop everything in your game with sound :)
  • So I have different heights of floors (like stairs) and when I punch enemy, enemy is supposed to be moving backwards by a set speed for a second's duration. Problem is, when the enemy (while moving backwards after being punched) is overlapping a solid (floor object), the enemy "teleports" to another place.

    I understand why it happens. Platform-behavior characters can't overlap solid objects.

    I want to ask what is a possible way to prevent this? Thanks.

  • anyone help?

  • I don't get it... Can you post a simple capx that contains the basic functions and the problem..?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • eli0s

    I can only describe this problem like this picture

    Hero and Enemy both have platform behavior.

    gray boxes are solid floor objects

    blue arrow - velocity of enemy being pushed towards solid

    green arrow means the hero punches the enemy

    The others are already listed in the picture

    Bro, I remember you. You helped me before. Can you help me also here?


    this is the picture explanation

    condition for this is of course when player character is overlapping solid object

  • So how do you exacly move an enemy? By changing its position?

    If it has platform behavior, try using "Add Vector X" function. This way it will recognize collision with a wall and stop it.

  • Hello! I tried to tackle both issues in the following capx. Please note that the steeper the angle of the floor, the more likely is to get "artifacts". Also, since I don't really understand how do you want to move the Enemy, I used 2 similar ways (the one is disabled, just enable it and disable the other which is active), and added a few stuff as a bonus Play with the values to get the result you are after.

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