Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

how can i change the boolean to true in this case????

$
0
0
#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????

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>