Jump to content

Jumping on platform creates drag


raphaklaus
 Share

Recommended Posts

Hello! I've created an example to illustrate what's going on. Sorry for the big data-urls :lol:

https://jsfiddle.net/yero3zt8/2/

If you press space, the square jumps out of the ground, but when it reaches the ground again it takes one update cycle to give the jumping box velocity. 

Once the ground is moving continuously, this situation creates a drag. I think I'm missing something, maybe a better update logic or a method call.

How do you guys are solving this situation in your games?

Link to comment
Share on other sites

1 hour ago, samme said:

Try 


box.body.friction.set(0);

 

I've added it to create, and it doesn't works.

2 hours ago, drhayes said:

Can you set the body.x to 100 every time in update?

No, because it will mess the physics in the game since I use Arcade Physics...

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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