in

This site is all about the amazingly cool stuff you can do with VB.NET.

zip VB.NET XNA Per Pixel Collision Sample

Downloads: 263 File Size: 48kB
Posted By: admin Views: 348
Date Added: 12-18-2007

2D Collision Sample 2: Per-Pixel

This sample demonstrates per-pixel collision detection.

Introduction

In the previous example, you created a simple object avoidance game using rectangle collision detection. The rectangles used were only an approximation of the blocks and person drawn into the textures. You may have noticed the exclusive use of rectangles resulted in imprecise behavior for nonrectangular objects.

In order to achieve the desired behavior, the code must examine every overlapping pixel to determine if there is a collision. This is called per-pixel collision.

Comments

No comments exist for this file.

Copyright 2008 - ILoveVB.NET
Powered by Community Server (Commercial Edition), by Telligent Systems