Question about vector object in BGT
Hi.
I want to create vector normalization function in BGT, but have an error. It says that object handle for vector object isn't supported.
Is it really impossible to use vectors as parameters or return value? Here is the current script.
vector@ normalize(vector@ pv){
//Normalizes the specified vector
float shrink=1/pv.length();
return vector(pv.x*shrink,pv.y*shrink);
}
void main(){
vector test(3,3);
vector ret=normalize(test);
alert("Result","The normalized test vector's x value is "+ret.x+", and y value is "+ret.y+"");
exit();
}
I'm experimenting an advanced object movement that requires a lot of physical calculation.
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector