Page 1 of 1

Gravity stops working after collision

Posted: Thu Jan 31, 2013 10:42 pm
by delcore92
Hello, im having a problem with the physics in my game. It seems like after my dynamic physics body (character) collides with a static physics body (stage) the gravity no longer applies to my character, so when i step off the stage he hovers... if you let the character fall from its initial position he falls straight past.

The controles are the arrow keys for left and right.

Thanks for any help in advance :o

Re: Gravity stops working after collision

Posted: Fri Feb 01, 2013 2:49 am
by substitute541
Haven't checked your code but, from the problem you said, I think your disabling gravity when the user touches the stage.

Edit : Man so many newbies use love.physics for pretty simple games. So yeah, I don't want to go through and explain EVERY topic in game physics, because, that would be my 3rd time. I think I'll write a blog post instead...

Re: Gravity stops working after collision

Posted: Sun Feb 03, 2013 6:02 am
by delcore92
Can you tell me what im doing wrong ??
the program is closely based to one of the examples that love 2d provides

Re: Gravity stops working after collision

Posted: Sun Feb 03, 2013 3:47 pm
by Saegor
please give us the tutorial you followed cause i can't understant your code

love.physics is an advanced gear, please don't use this until you coded your first own basic physics functions
(and take the time to experiment very slowly the module)