Question by
kocvolkan38 · Jun 01, 2017 at 03:00 PM ·
raycasthit.point
Raycast targets to origin
Hi, i'm trying to do this: https://www.youtube.com/watch?v=CqcvfxOxNPk But my raycasts are targeting to the world's origin.
For example in the code:
//front sensor
if (Physics.Raycast(sensorStartPos, transform.forward, out hit, sensorLength))
{
Debug.DrawRay(sensorStartPos, hit.point);
}
I think, my problem is hit.point. Because i've tried to "debug.log ("hit.point")" and it looks 0,0,0 point. How can i solve this ? What i missed ?
Comment