Slick Forums

Discuss the Slick 2D Library
It is currently Sat Jun 03, 2023 8:29 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Mon Jan 09, 2012 2:15 am 
Offline

Joined: Mon Jan 09, 2012 2:10 am
Posts: 17
Hey, guys. I'm trying to set up physics for a simple platformer using Fizzy. I created a Rectangular DynamicObject to represent my player, and turned on a small gravitational force. At the moment, I'm having the game apply "forces" to the object in the update method based on which of the arrow keys I'm holding down. Here's the weird thing: when I start the game, the player sprite falls to the nearest solid surface and stays there, but if I push him back up (applying a vertical force) he'll hang in the air. It's only when I apply a horizontal force of some kind (make him move left or right) that he actually falls again. Do any of you know why this might be happening?


Top
 Profile  
 
PostPosted: Fri Feb 10, 2012 2:17 am 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
can I see a snippet of the code you are using to apply forces?

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group