Timeline for Is there a good way to get pixel-perfect collision detection in XNA?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 13, 2019 at 18:07 | comment | added | Marshall | both color and sprite are called a and b. That is confusing | |
Aug 8, 2011 at 23:42 | comment | added | pek | Yeah, coming from a Java background, I still need to learn a lot of C# tricks.. ;) | |
Aug 8, 2011 at 21:16 | comment | added | Jonathan Connell |
Just being pedantic, but you only need : CollidesWith(Sprite other, bool calcPerPixel = true); :)
|
|
Aug 4, 2011 at 20:42 | vote | accept | ashes999 | ||
Jul 26, 2011 at 6:40 | comment | added | pek | Yes, I forgot about that! The code does not take transformation into consideration. Right now I don't have the time to edit, but you can have a look at the Collision Transformed sample until I do: create.msdn.com/en-US/education/catalog/tutorial/… | |
Jul 26, 2011 at 3:33 | comment | added | ashes999 |
I know I mentioned this in my question, but I need to state it again: does this handle scaling and rotation? Can two scaled, rotated sprites correctly intersect? (I can handle adding a quick bounding-box first pass though.) Or is this covered with calls to Bounds ?
|
|
Jul 25, 2011 at 22:26 | history | edited | pek | CC BY-SA 3.0 |
forgot to change the type of the arrays
|
Jul 25, 2011 at 19:47 | comment | added | General Waters | The code tells you what. Any comments tell you why. However, this code is fairly straightforward to not need the why. | |
Jul 25, 2011 at 19:45 | comment | added | user744 | Any explanation would just be restating the code, and the code is fairly straightforward. | |
Jul 25, 2011 at 19:31 | comment | added | AttackingHobo | Down-vote for a code dump with no comments or explanation. | |
Jul 25, 2011 at 18:35 | history | answered | pek | CC BY-SA 3.0 |