Jump to content

Detect collision end between 2 collision group


Recommended Posts

Hi guys, I've a character (collision group 0) that can jump on a platform (collision group 4).


This is my collide function:

else if (other.collisionGroup === 4) {            if (player.last.y + player.shape.height / 2 <= other.position.y - other.shape.height / 2) {            player.onGround = true;            player.mass = 1;            player.velocity.y = player.velocityLimit.y;            }            else return false;}

is it possible to detect when collision between character and group 4 end in order to set player.onGround on FALSE?


Thank you ^_^

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...