- Home /
Get object bottom/top point after rotation
Hi everybody,
So my problem is: I am creating some points using the bounds of my collider so i can get the bottomLeft, bottomRight, topLeft and topRight of my collider. To achieve this i am using this code
bottomLeft = new Vector2(bounds.min.x, bounds.min.y);
bottomRight = new Vector2(bounds.max.x, bounds.min.y);
topLeft = new Vector2(bounds.min.x, bounds.max.y);
topRight = new Vector2(bounds.max.x, bounds.max.y);
The problem is that my object rotates and so my collider. What i need to achieve is to get those same points (bottomLeft,right, topLeft,right) with my actual rotation. Is there a way of achieving this?
Thank you all for your attention.
Comment