Hi guys, I got a little problem regarding the Physics.Raycast.
I got a little Script that is suposed to cast a Ray from one position to another.
function Start () {
var hit: RaycastHit;
if (Physics.Raycast (Vector3(26,1.5,12), Vector3(25,0,13), hit, 100)){
print("testtesttest");
var myobject = hit.transform.gameObject;
myobject.renderer.enabled = false;
}
}
The problem ist that it won’t get behind the “if”, but it should definetly be something in this way since there is an object on position 26,1,13.