3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: impostors Orientation?  (Read 486 times)

« on: January 10, 2012, 02:13:20 PM »
hello I have a question. as I can I can turn the impostors?
 in a particular direction. for each ???
Orientacion about X,Y,Z ?

-------------------------------------------------------------------------
Quaternion q;
void Main()
{

if(iInitializing())
iObjectImpostersCreate(OBJ_0,143);

iQuaternionFromEulerAngles(q,0,0,0,"xyz");


// 1 - line
iObjectImposterSet(OBJ_0,0,q,Vector3(1.25,0,0));
}
-------------------------------------------------------------------------
« Last Edit: January 10, 2012, 02:17:15 PM by Darkcapilla »

jestermon

« Reply #1 on: January 10, 2012, 03:20:28 PM »
Just change the Xangle and Yangle values to change imposter orientation

int MYOBJECT = OBJ_0;
int index = 1;  //to simplify things
float Xangle = 10;
float Yangle = 30;
float Zangle = 0;    //Only use 2 angles to rotate, a 3rd angle is not required
Quaternion orientation;
Vector3 location = Vector3(0,20,10);  //example location
iQuaternionFromEulerAngles(orientation, Xangle, Yangle, Zangle, "xyz");
iObjectImposterSet(MYOBJECT,index,orientation,location);
« Reply #2 on: January 10, 2012, 04:23:11 PM »
Thank you very jestermon  8)

jestermon

« Reply #3 on: January 10, 2012, 08:07:56 PM »
Anytime.
Pages: [1]