#pragma strict
static var isdodge : boolean;
var direction;
var hit : RaycastHit;
var estranho : GameObject;
function Start () {
direction = transform.TransformDirection (Vector3.up);
isdodge = false;
}
function Update () {
Debug.DrawLine (transform.position, hit.point, Color.red);
if (Physics.Raycast ( transform.position, direction , hit,20)){
isdodge = true;
I'm trying to assign true when isn't colide anymore
if (!Physics.Raycast ( transform.position, direction , hit,20)){ == does'nt work...
how can i change the boolean to true in this case????
static var isdodge : boolean;
var direction;
var hit : RaycastHit;
var estranho : GameObject;
function Start () {
direction = transform.TransformDirection (Vector3.up);
isdodge = false;
}
function Update () {
Debug.DrawLine (transform.position, hit.point, Color.red);
if (Physics.Raycast ( transform.position, direction , hit,20)){
isdodge = true;
I'm trying to assign true when isn't colide anymore
if (!Physics.Raycast ( transform.position, direction , hit,20)){ == does'nt work...
how can i change the boolean to true in this case????