half extents

blue line is hypotenuse

From there you can simply linearly add Pi/4 to the angle (45 degrees), then use:

newx = cos(newAngle)*dist;
newy = sin(newAngle)*dist;

http://gamedev.stackexchange.com/questions/14733/aabb-of-rotated-sprite

原文地址:https://www.cnblogs.com/jiahuafu/p/6211855.html