function Update () {
var fwd = transform.TransformDirection (Vector3.forward);
var hit: RaycastHit;
if (Physics.Raycast (transform.position, fwd, 100)) {
touchedCol = hit.collider;
}
}
My code with raycasts barely ever works, I’m declaring the touchedCol variable already. I’m not getting errors, it’s just that the touchedCol variable isn’t returning anything.
Screenshot 2
[1406-BugScreen2.jpg|1406]