I am having an issue adding another child to an existing parent. I get a CTD when the vessel is loaded.
in the h file
Code:
{
static UINT EGrp20[4] = {22,23,156,117};// mount
static UINT EGrp21[2] = {0,95}; //laser and rings
static UINT EGrp22[1] = {189};//laserbeam ray
static MGROUP_ROTATE TURRET (0,EGrp20, 4, _V(0,1.183,-1.707), _V(0,1,0), (float)(360*RAD));
GUN = new MGROUP_ROTATE(0,EGrp21, 2, _V(0,1.864,-1.707), _V(1,0,0), (float)(-60*RAD));
BEAM = new MGROUP_TRANSLATE(0,EGrp22, 1, _V(0,0,30));
ANIMATIONCOMPONENT_HANDLE parent, parent2;
anim_TURRET = CreateAnimation (0.0);
parent = AddAnimationComponent (anim_TURRET, 0, 1, &TURRET);
anim_gun = CreateAnimation (0.0);
AddAnimationComponent (anim_gun, 0, 1, GUN, parent);
anim_beam = CreateAnimation (0.0);
AddAnimationComponent (anim_beam, 0, 1, BEAM, parent2);
Code:
MGROUP_TRANSFORM *TURRENT, *GUN, *BEAM;