- Home /

# Bounds with Rotation: Getting y value of the point where its on the most left side of the collider (bounds.min.x) Note that the box collider has been rotated as well.

I understand that I can get the most low value of x of an object's collider using ().bounds.min.x, but on that point where the bound x value is the lowest, can I get its y value as well?

Any help?

Thanks

SInce Bounds represents a box, at runtime you could instantiate (at bounds.min.x) a quad rotated and scaled so it fits the left face of the AABB. With OnCollisionEnter(Collision collision), you can get the contact points. Iterate through them and keep the lowest y. You don't need the quad anymore, so you can destroy it. For OnCollisionEnter to work, you must have rigidbody added.

Other more straighforward way is to loop though the vertex positions of your mesh (hopefully it isn't too large). For those vertices that are very close to bounds.min.x, compare their y to keep the lowest.

**Answer** by Yeezyy
·
Dec 07 at 07:10 AM

Lowest left point for y =collider.bounds.center.y - collider.bounds.extend.y

**Answer** by Cheong
·
Dec 07 at 10:09 AM

thanks @Yeezyy and @Dragate for the replies, looks like I found a solution for getting the full coordinate :) I used the mathematical equation for circles, where r^2 = x^2 + y^2, where I get the radius first using collider size.x and y, then reapply into the equation again, by assigning x = collider.bounds.min.x, and r = radius found, and finally I can get the y value where the point is having min x on collider.

Yes it is a box collider, to get the vertices of the rotated boxcollider, then it will need the equation of a circle. Thanks :)

### Your answer

### Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.

### Follow this Question

### Related Questions

How to set parent collider equal to child collider visually? 2 Answers

Mouse look X axis not working? 0 Answers

Access other game object BoxCollider 1 Answer

Box collider with character controller? 0 Answers

Set a variable to a collider type. 1 Answer