Jump to content

  • Log In with Google      Sign In   
  • Create Account

AdvsNoob

Member Since 31 Dec 2012
Offline Last Active Jan 03 2013 12:22 AM

Posts I've Made

In Topic: Best way for 2D platform collision?

03 January 2013 - 12:23 AM

You could take a look at the XNA Platformer starter kit, perhaps you could get some inspiration from that.<br />http://msdn.microsoft.com/en-us/library/dd254918%28v=xnagamestudio.31%29.aspx

 We got it working! YEAHHH! Thanks everyone!


In Topic: Best way for 2D platform collision?

02 January 2013 - 11:27 PM

Collision works now, but when the player is standing on a tile and lets say a tile is on his right and he is touching it. He cant jump up.


In Topic: Best way for 2D platform collision?

02 January 2013 - 02:59 AM

Well i know that. But what is the best method to use to do this?
Check each axis of the two rectangles to see if either overlap. If so, separate by either the minimum axis of overlap or by some heuristic based on the direction of travel.

This is pretty simple, what exactly are you having trouble with detecting and resolving axis-aligned rectangles?

 

 

We got the rectangles working now its just making the player stay on top of the block. I currently have it reset the Y position of the player to a constant part of the map but how can I get it so the players position will be set to the top of the block?


In Topic: Best way for 2D platform collision?

01 January 2013 - 06:07 AM

Easiest way would be making it tile-based. So the collisions are just simple rectangle intersections.

Well i know that :P But what is the best method to use to do this?


PARTNERS