Is there anyway to ensure that I can send my object flying backwards from the way it is currently facing?
For instance I tried this :
var backward;
backward=Vector3(0,0,-10);
function Knockback(direction : Vector3,duration : float,speed : int)
{
var startTime = Time.time;
while(Time.time < (startTime + duration))
{
charController.SimpleMove(direction*speed);
yield;
}
}//end function
However all this does is send my object flying in the same direction, no matter where it is facing.