I have 2 simple scripts witch have to dray a ray from an objects position upwards but it dosent do anything,
--the class witch draws the ray
#pragma strict
class aClass
{
var pos : Transform;
function Update()
{
if(pos != null)
{
Debug.DrawRay(pos.position,Vector3(0,10,0), Color.red);
}
}
}
--the script witch sets the transform
#pragma strict
var grid : aClass = new aClass();
function Start ()
{
grid.pos = gameObject.transform;
}
The scripts are rather simple but it dosent work and it dosent have any warnongs or errors.What am I doing wrong?
↧