yo mans!.. check this out… this is what it says on the docs
[COLOR="seagreen"]// Animates the position in an arc between sunrise and sunset.[/COLOR]
var sunrise : Transform;
var sunset : Transform;
function Update () {
[COLOR="seagreen"]// The center of the arc[/COLOR]
var center = (sunrise.position + sunset.position) * 0.5;
[COLOR="seagreen"]// move the center a bit downwards to make the arc vertical[/COLOR]
center -= Vector3(0,1,0);
[COLOR="seagreen"]// Interpolate over the arc relative to center[/COLOR]
var riseRelCenter = sunrise.position - center;
var setRelCenter = sunset.position - center;
transform.position = Vector3.Slerp(riseRelCenter, setRelCenter, Time.time);
transform.position += center;
}
so i did this on my game
pointA : Transform;
pointB: Transform;
happensonlyonce = false;
function Update ( ) {
if(!happensonlyonce ) {
transform.position = Vector3.Slerp(pointA, pointB, Time.time);
happensonlyonce = true;
}
}
and it doesnt even give me the chance to test… a error pops up saying “the best way to overload yada yada yada”
weird huh?.. did i do something wrong?