On Collision issue

0 favourites
  • 3 posts
  • Hi

    I have a player sprite that dies when it touches the obstacle sprite.

    This works until the player sprite partly touches an obstacle sprite that is at the same height as the ground.

    When the player sprite partly touches other obstacles (of the same obstacle sprite) the player dies, but not when it partly touches an obstacle of the same height as the ground.

    Any ideas where I'm going wrong with this?

    Dropbox capx here dl.dropboxusercontent.com/u/14979031/RunNJump/RunNJump.capx

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You're not really going wrong anywhere..

    If you make a platform on which the player stands and you move to the left or right, the player only starts falling if it is completely free from the platform, the same applies here. the player isn't colliding with the obstacle untill it is completely clear of the ground.

    This is built in in the platform behaviour, so you will have to find a way around it to check if the player is colliding on the same level as the ground. (you could use a detection sprite for it, or maybe an imagepoint or overlapping with offset detection)

  • nickl That is because your 2nd event only checks collision with the red sprite exclusively. To solve this, use overlap at offset (x=1,y=1) instead of on collision, should do the trick.

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