Hi everyone,
I am moving forward on my worms project. I have had a problem with P2 physics for a while that I cannot solve and I need to solve it for impact events.
THE DEMO: (Chrome Firefox only)
THE REPO:
THE PROBLEM:
On contact with my level (on a hill) my worm keeps sliding veeeery slowly and annoyingly. If the worm is in contact with the level he should stay still (but he won't).
ATTEMPTED:
Setting the body of the worm properties: velocity.x =0, velocity.y=0, rotation = 0, angle=0, angularDamping =0, angularVelocity = 0, gravityScale = 0.1 (allowGravityScale = true);
Setting the game.physics.p2 properties: friction = 1 (tried 0, 1000, 3000 etc), p2.world.defaultContactMaterial.friction = same thing, restitution = 1;
CODE OF INTEREST:
WORM CLASS - specifically lines 112-117
GAME STATE
Thanks in advance for your help!