Jump to content

Player can jump on box but not move them (but they still fall under gravity


Recommended Posts

Hi guys!

My problem is dead simple but I can't find any perfect solution for it.

I have a game, let's say Mario-like, where there's a player and some boxes. I want the boxes to act like normal arcade physics objects : they fall under gravity (they can be dropped from the sky). And I want the player to be able to jump on them. However, I do not want the player to be able to 'push' the boxes.

Also, the boxes can stack on top of others. And the ones under can be destroyed, so the others on top have to fall onto the ground. 

Any ideas?


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...