I am working on an elevator door where one dorr open and when it is to a point they both open some more and then when they reach a point all 3 door open.
NO errors in coding but only the 1st door opens.
where is were it gets moves:
NO errors in coding but only the 1st door opens.
Code:
//HANGARDOORS
ANIMATIONCOMPONENT_HANDLE parent;
//HANGARDOOR
static UINT EGrp78[2] = {4,28};//door1
static MGROUP_TRANSLATE hdoor1 (0,EGrp78, 2, _V(0,0,-.6));
anim_HANGARDOOR = CreateAnimation (0);
parent = AddAnimationComponent (anim_HANGARDOOR, 0, 1, &hdoor1);
//door2
static UINT EGrp79[2] = {3,27};//door2
hdoor1a = new MGROUP_TRANSLATE (0, EGrp79, 2,_V(0,0,-1.2));
anim_HANGARDOOR1a = CreateAnimation (0.0);
parent = AddAnimationComponent (anim_HANGARDOOR1a, 0, 1, hdoor1a, parent);
//DOOR3
static UINT EGrp76[2] = {2,31};//door3
hdoor1b = new MGROUP_TRANSLATE (0, EGrp76, 2,_V(0,0,-1.85));
anim_HANGARDOOR1b = CreateAnimation (0.0);
parent = AddAnimationComponent (anim_HANGARDOOR1b, 0,1, hdoor1b, parent);
where is were it gets moves:
Code:
if (LP5_status >= HATCH_RAISING) {
double da = simdt * LIFT_SPEED;
if (LP5_status == HATCH_RAISING) {
if (LP5_proc > 0.0) LP5_proc = max (0.0, LP5_proc-da);
else LP5_status = HATCH_UP;
} else {
if (LP5_proc < 1.0) LP5_proc = min (1.0, LP5_proc+da);
else LP5_status = HATCH_DOWN;
}
SetAnimation (anim_HANGARDOOR, LP5_proc);
SetAnimation (anim_HANGARDOOR1a, LP5_proc);
SetAnimation (anim_HANGARDOOR1b, LP5_proc);
}