Jump to content

Falling from long distances can make Phaser Sprite to ignore collision over Tiles?


msqar
 Share

Recommended Posts

So I made a really simple platformer game, made the map with Tiled. Then my character is a sprite with ARCADE Physics that i make it jump across the map.

But i noticed that whenever it falls from let's say 12 tiles tall that are 64x64, whenever it hits the floor it will pass directly through it and completely ignoring collision detection.

Do you guys know what could be happening? I tried googling but seems to be a problem with my game, because i found 0 posts related to it.

If you need specific parts of the code, let me know, but code itself is quite basic, the only complex thing i've been implementing is the jumping logic. But overall it's a simple Sprite with arcade physics enabled.

Hope you guys can help me on this one :)

EDIT: I just uploaded a screenrecord of the game. I jump not from far the first time and it doesn't happen, but when i do it slightly higher, it happens.

 

Link to comment
Share on other sites

13 hours ago, samme said:

It may be absent from the TypeScript definitions. But it definitely exists.

You can also decrease body.maxVelocity (px/s) or set body.deltaMax (px/frame).

Thanks for replying. I tried setting maxVelocity to 500 instead of default 1000, and still happens. I don't know how to use the deltaMax one. Do you have any example?

Thanks in advance.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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