Collision with floors

Started by
1 comment, last by DarkHamster 21 years, 5 months ago
What is a good method for collision detection with floors? Do you let the player fall down every frame and pick them back up because they have collided with the floor? Do you check if theyre on top of a "floor" polygon and drop them if they arent? About the last post of this: when I clicked post, the website paused for a really long time, and when it was posted it had a different subject than I had put in...

"All that''s to come and everything under the sun is in tune but the sun is eclipsed by the moon"


"There is no dark side of the moon really,
As a matter of fact, its all dark."
Advertisement
Pretty much The Way I have seen it mostly done is you do all your physics, Includeing gravity then you do your collisions and "Push" your Character out aslong as that isn''t to fast he won''t fall thorugh it and if it is fast test a line of his movement from point a to point b from his to positions.
"I seek knowledge and to help those who also seek it"
The tricky part I see there is if you land on a corner. If your physics covers the same amount of time each tick on all machines, this shouldn''t be a problem.

If different machines tick in different time frames, though, it can slightly affect how well the character could land on the very corner of a block in a 2D game. Hardcore advocates would be bothered if a jumping strategy always worked on one machine but not always on another.
It's not what you're taught, it's what you learn.

This topic is closed to new replies.

Advertisement