0 Members and 1 Guest are viewing this topic.
effacé pour plus de lisibilité. Cette partie ne marchait pas.
void LTVROVER ::DefineAnimations (void){ // -------Front Left Wheel Turn static UINT TurnG1[1]={45}; static MGROUP_ROTATE tug1(0,TurnG1, 1, _V(-0.261,-0.166,0.357), _V(0,1,0), 20*RAD); static UINT TurnG11[1]={49}; static MGROUP_ROTATE tug11(0,TurnG11, 1, _V(-0.261,-0.166,0.357), _V(0,1,0), 20*RAD); // -------Rear Left Wheel Turn static UINT TurnG3[1]={46}; static MGROUP_ROTATE tug3(0,TurnG3, 1, _V(-0.261,-0.166,-0.356), _V(0,1,0), -20*RAD); static UINT TurnG33[1]={50}; static MGROUP_ROTATE tug33(0,TurnG33, 1, _V(-0.261,-0.166,-0.356), _V(0,1,0), -20*RAD); // -------Front Right Wheel Turn static UINT TurnD1[1]={44}; static MGROUP_ROTATE tud1(0,TurnD1, 1, _V(0.261,-0.166,0.357), _V(0,1,0), 20*RAD); static UINT TurnD11[1]={48}; static MGROUP_ROTATE tud11(0,TurnD11, 1, _V(0.261,-0.166,0.357), _V(0,1,0), 20*RAD); // -------Rear Right Wheel Turn static UINT TurnD3[1]={47}; static MGROUP_ROTATE tud3(0,TurnD3, 1, _V(0.261,-0.166,-0.356), _V(0,1,0), -20*RAD); static UINT TurnD33[1]={51}; static MGROUP_ROTATE tud33(0,TurnD33, 1, _V(0.261,-0.166,-0.356), _V(0,1,0), -20*RAD); // -------Left Wheels rotation (forward and backward) static UINT roueG1[2] = {35,36}; roueG1_rot = new MGROUP_ROTATE (0, roueG1, 2, _V(-0.261,-0.166,0.357), _V(1,0,0), 360*RAD); roueG1_invrot = new MGROUP_ROTATE (0, roueG1, 2, _V(-0.261,-0.166,0.357), _V(-1,0,0), 360*RAD); static UINT roueG2[2] = {33,34}; roueG2_rot = new MGROUP_ROTATE (0, roueG2, 2, _V(-0.261,-0.166,0.000), _V(1,0,0), 360*RAD); roueG2_invrot = new MGROUP_ROTATE (0, roueG2, 2, _V(-0.261,-0.166,0.000), _V(-1,0,0), 360*RAD); static UINT roueG3[2] = {32,37}; roueG3_rot = new MGROUP_ROTATE (0, roueG3, 2, _V(-0.261,-0.166,-0.356), _V(1,0,0), 360*RAD); roueG3_invrot = new MGROUP_ROTATE (0, roueG3, 2, _V(-0.261,-0.166,-0.356), _V(-1,0,0), 360*RAD); // -------Right wheels rotation (forward and backward) static UINT roueD1[2] = {26,27}; roueD1_rot = new MGROUP_ROTATE (0, roueD1, 2, _V(0.261,-0.166,0.357), _V(1,0,0), 360*RAD); roueD1_invrot = new MGROUP_ROTATE (0, roueD1, 2, _V(0.261,-0.166,0.357), _V(-1,0,0), 360*RAD); static UINT roueD2[2] = {28,29}; roueD2_rot = new MGROUP_ROTATE (0, roueD2, 2, _V(0.261,-0.166,0.000), _V(1,0,0), 360*RAD); roueD2_invrot = new MGROUP_ROTATE (0, roueD2, 2, _V(0.261,-0.166,0.000), _V(-1,0,0), 360*RAD); static UINT roueD3[2] = {30,31}; roueD3_rot = new MGROUP_ROTATE (0, roueD3, 2, _V(0.261,-0.166,-0.356), _V(1,0,0), 360*RAD); roueD3_invrot = new MGROUP_ROTATE (0, roueD3, 2, _V(0.261,-0.166,-0.356), _V(-1,0,0), 360*RAD); anim_rudder = CreateAnimation (0.5); // rudder1 : AIRCTRL_RUDDER/AIRCTRL_AXIS_YPOS anim_rudder2 = CreateAnimation (0.5); //rudder2 : fix? anim_roues = CreateAnimation (0); // forward inv_anim_roues = CreateAnimation (0); // backward // l&r turn anim (Control surface) forward /rudder1 parent1 = AddAnimationComponent (anim_rudder, 0, 1, &tug1); parent2 = AddAnimationComponent (anim_rudder, 0, 1, &tug3); parent3 = AddAnimationComponent (anim_rudder, 0, 1, &tud1); parent4 = AddAnimationComponent (anim_rudder, 0, 1, &tud3); parent5 = AddAnimationComponent (anim_rudder2, 0, 1, &tug11); parent6 = AddAnimationComponent (anim_rudder2, 0, 1, &tug33); parent7 = AddAnimationComponent (anim_rudder2, 0, 1, &tud11); parent8 = AddAnimationComponent (anim_rudder2, 0, 1, &tud33); // Forward wheels rotation (->PostStep) AddAnimationComponent (anim_roues, 0, 1, roueG1_rot, parent1); AddAnimationComponent (anim_roues, 0, 1, roueG3_rot, parent2); AddAnimationComponent (anim_roues, 0, 1, roueD1_rot, parent3); AddAnimationComponent (anim_roues, 0, 1, roueD3_rot, parent4); AddAnimationComponent (anim_roues, 0, 1, roueG2_rot); AddAnimationComponent (anim_roues, 0, 1, roueD2_rot); // Backward wheels rotation (->PostStep) AddAnimationComponent (inv_anim_roues, 0, 1, roueG1_invrot, parent5); AddAnimationComponent (inv_anim_roues, 0, 1, roueG3_invrot, parent6); AddAnimationComponent (inv_anim_roues, 0, 1, roueD1_invrot, parent7); AddAnimationComponent (inv_anim_roues, 0, 1, roueD3_invrot, parent8); AddAnimationComponent (inv_anim_roues, 0, 1, roueD2_invrot); AddAnimationComponent (inv_anim_roues, 0, 1, roueG2_invrot);