Jump to content

Failing Arcade physics collision detection


Terces
 Share

Recommended Posts

Hello everyone,

 

I've been having issues the last couple of days, because the arcade physics seem to be working unreliably in firefox. I have had no problems and no failures with it in Chrome.

 

In firefox every now and then the game lags (more of a stutter, very short freeze) and the arcade-physic collision detection fails. I can walk through walls, fall through the ground and jump through ceilings. Looking at the framerate reveals a small drop in framerate whenever this happens.

 

I also noticed that in Chrome the framerate stays more stable and the problem never happened so far. Looking through the issue tracker on github also didn't reveal anything in this direction.

 

Can anyone help me with this?

Link to comment
Share on other sites

I've also occasionally noticed my characters falling through floors, etc. when there is a framerate stutter and falling velocity is high. (on Google chrome)

 

Are there any settings to modify for Phaser to check collisions more thoroughly?

Link to comment
Share on other sites

So according to this thread http://www.html5gamedevs.com/topic/4929-20-arcaded-tile-collision-issue/ 

 

modifying (increasing) the value of game.physics.arcade.TILE_BIAS helps with this issue, by temporarily thickening the tiles when checking for collisions

 

But this means severe FPS drops can still manage to miss the tile completely, resulting in more falling through floors etc

 

Isn't there a way to fix this problem in a non-hackish way such as making the physics system step through the simulation based on delta time, or something?

Link to comment
Share on other sites

  • 2 months later...

To whom it may concern,

 

I read in another thread here that high gravity could also be responsible for collisions not working properly. In my case this was not the case though.
So I started messing around with the mass property on my objects

 

I cranked the mass down from 4 to 1.5 (default is 1) and this solved the issue on my end!

However, my character is now clearly taking more time pushing lighter objects around: I'll have to find a way to tweak the physics to solve this smaller issue.

 

So on my end, the problem seems solved.
By the way, I also tried using the TILE_BIAS approach (I set it in the update state on my level).

> This did not seem to do any good. All that it caused was that the game lagged.

 

Cheers!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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