Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Circle collision and Precise jumping


barodapride
 Share

Recommended Posts

Hi all, I'm very new to phaser and I have a couple questions before I continue with my project:

 

1. Is there a way to make circular objects and check collisions with them? If not, can I create a larger rectangular sprite (with a circular display of the image) with a smaller hitbox to provide the illusion of accurate hit detection?

 

2. Is there a way to provide accurate jumping based on time holding the jump key? In the examples, a simple initial y velocity is applied to the player upon jump. In Mario, and just about any platformer ever made, the velocity is constant or changes slightly over the first couple seconds of jumping depending on how long the jump button is pressed.

 

Thanks for any insight you can add.

Link to comment
Share on other sites

1) Not yet... Rich mentioned something about the new physics system that is not yet implemented being able to do more than the current AABB only.

 

2) Perhaps:
When jump is pressed, remove gravity from player, set velocity.

When jump is released, or if it is held down for a period of time, gravity is reapplied.

Just thought this up, haven't implemented it at all, but I have seen others post a similar question, if they happen along, perhaps they can share what they ended up with...

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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