• Post Reply Bookmark Topic Watch Topic
  • New Topic

Platform Game Collision with Platforms  RSS feed

 
christopher singh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Collision code for platforms in my Player class isn't working and sometimes glitches out. I created different methods for applying gravity and whatnot.

When the player is under a platform and they jump, I want them to collide with the bottom of the platform and fall back down using the gravity method I created.

When the player walks into both ends of the platform I want them to just stop beside it.

I would like the player to fall off the platform if they walk off it.

I want to make sure at all times that the player cannot go through the platform and that seems to be my downfall.

I would really appreciate it if anyone could help me out.

Here is my Player class, the applet screen size is 600x400:

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!