Hi there! Im getting to learn XNA. Could you give me some examples of simple 2d physics and collision detection? I've tryed to make my own physics but i failed in it because im not skilled coder yet
Sorry for my poor english, im from Russia!
2d collisions
Not sure which types of collision detection would be most useful to you. If you're doing 2d tile platformer these might help:
Types of tile based collision methods:
http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/
Pixel perfect collision detection:
http://gamedev.stackexchange.com/questions/15191/is-there-a-good-way-to-get-pixel-perfect-collision-detection-in-xna
Here you can find rectangle-based collision detection source code - also links to pixel-collision and others:
http://xbox.create.msdn.com/en-US/education/catalog/tutorial/collision_2d_rectangle
I'm thinking rectangle-rectangle collision detection works for most things (but may want to try bounding-circle [radius-overlap] for some things)
Types of tile based collision methods:
http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/
Pixel perfect collision detection:
http://gamedev.stackexchange.com/questions/15191/is-there-a-good-way-to-get-pixel-perfect-collision-detection-in-xna
Here you can find rectangle-based collision detection source code - also links to pixel-collision and others:
http://xbox.create.msdn.com/en-US/education/catalog/tutorial/collision_2d_rectangle
I'm thinking rectangle-rectangle collision detection works for most things (but may want to try bounding-circle [radius-overlap] for some things)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement