Gravity stops working after collision

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
delcore92
Prole
Posts: 5
Joined: Wed Jan 30, 2013 1:52 am

Gravity stops working after collision

Post 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
Attachments
sumo.love
My game
(40.75 KiB) Downloaded 172 times
User avatar
substitute541
Party member
Posts: 484
Joined: Fri Aug 24, 2012 9:04 am
Location: Southern Leyte, Visayas, Philippines
Contact:

Re: Gravity stops working after collision

Post 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...
Currently designing themes for WordPress.

Sometimes lurks around the forum.
delcore92
Prole
Posts: 5
Joined: Wed Jan 30, 2013 1:52 am

Re: Gravity stops working after collision

Post by delcore92 »

Can you tell me what im doing wrong ??
the program is closely based to one of the examples that love 2d provides
User avatar
Saegor
Party member
Posts: 119
Joined: Thu Nov 08, 2012 9:26 am
Location: Charleroi

Re: Gravity stops working after collision

Post 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)
Current work : Isömap
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests