- Home /
Question by
Nicolas-Liatti · Sep 04, 2013 at 01:22 PM ·
rayboundsintersection
Get coordonates of a ray in a bounding box?
Hi,
I'm trying to get the hit coordinates of a ray with the bounding box of an object... There is an IntersecRay function, but it's just a boolean. I would to know where it hits the bounding box of a Capsule collider. Any idea?
Cheers, Nicolas
Comment
Not exactly what you are asking for, but you might take a look at Collider.ClosestPointOnBounds().
Answer by MissingSemicolon · Sep 04, 2013 at 01:45 PM
This thread should give you want you want:
http://answers.unity3d.com/questions/11212/location-of-raycast-collision.html
Actually I don't need the Collider, I really need the bounding box. So I think I will find a trick.
Thanks anyway!