2D Texture Reduction in XNA

I would like to reduce the Texture2D object to another Texture2D object in XNA.

The reason is to use a smaller object to detect pixel-based collisions.

Can this be done?

+5
source share
1 answer

You should take a look at for a pixel collision guide , as well as a converted pixel collision tutorial .

Essentially, to do conflict detection on a transformed texture (e.g. scaled as you want), you use transformation matrix . This is not too complicated, and the lessons provide a good example. The textbook does not scale, but rotates, but comments are included in the source, which shows where and how to do the scaling.

+3
source

All Articles