I want to instantiate a GameObject at the location a raycast collide with the mesh collider. How can i get the location of the collision?
asked Feb 08 '10 at 01:03 PM
You need to pass a "RaycastHit" object into the raycast function, and then if the raycast returns as true, the RaycastHit object's variables will be filled with data about the intersection, including the "point" variable, which gives the raycast collison location in world space.
answered Feb 08 '10 at 02:32 PM