Hi there,
I'm using Advanced Collision to make a fighting game. I've managed to compare two rects to check for collision using this code:
float originX = (currentSprite.FlipX) ? -currentSprite.CurrentSprite.customColliders[i].origin.x : currentSprite.CurrentSprite.customColliders[i].origin.x;
Rect collisionRect = new Rect(
(gameObject.transform.localPosition.x+originX)-currentSprite.CurrentSprite.customColliders[i].Size.x/2,
(gameObject.transform.localPosition.y+currentSprite.CurrentSprite.customColliders[i].origin.y)-currentSprite.CurrentSprite.customColliders[i].Size.y/2,
currentSprite.CurrentSprite.customColliders[i].Size.x,
currentSprite.CurrentSprite.customColliders[i].Size.y);
But now i'm facing another problem, i got a sprite with a 45 degree angle, like this:
![](http://s28.postimg.org/4pt35aky4/Screen_Shot_2015_09_27_at_2_58_34_PM.jpg)
But when I run that code into this kind of image, this happen:
![](http://s14.postimg.org/58ot6qy34/Screen_Shot_2015_09_27_at_3_01_39_PM.jpg)
I coudn't find a way to rotate a Rect, how can i do that?
Thanks!
![Cheesy :D](https://www.2dtoolkit.com/forum/Smileys/default/cheesy.gif)