- Home /
Question by
electro_unity · May 19, 2018 at 03:23 PM ·
boundsborders
How to get border points of a gameobject?
Hello, I wonder how could I get the border points of a gameobject. Player is throwing a raycast to the object and I dont know how to get those points.
preg.png
(16.4 kB)
Comment
To point you in the right direction, if it has a mesh, access the mesh component's bounds property. It'll just take a bit of math from there. Do make use of the API reference and the manual.
Answer by raybarrera · May 20, 2018 at 07:49 PM
There are a few ways to do it, but they require using the Bounds of either a mesh, a collider or a renderer. Check the docs for more details.