Project Silent running drones

Thanks. here is where the attachment points end. It looks like the attachment rotates in the x direction and then the z direction.
All my animations are in the z direction. fore and aft
You have specified a different axis of rotation for the attachment point than you have for the mesh groups. From your code posted above (see red highlights):
Code:
arm1a = new MGROUP_ROTATE (0, arm_groups1_2, 5,_V(-1.09,-.259,.2), [COLOR=Red][B]_V(1,0,0)[/B][/COLOR], (float)(180*RAD));
arm1av = new MGROUP_ROTATE (LOCALVERTEXLIST, MAKEGROUPARRAY(&claw), 1, _V(-1.09,-.259,.2), [COLOR=Red][B]_V(0,0,1)[/B][/COLOR], (float)(180*RAD));
Change to:
Code:
arm1av = new MGROUP_ROTATE (LOCALVERTEXLIST, MAKEGROUPARRAY(&claw), 1,  _V(-1.09,-.259,.2), [COLOR=Red][B]_V(1,0,0)[/B][/COLOR], (float)(180*RAD));
 
Thanks, back from vacation. That fixed that. But I think I need to change the rot and direction. AS noted in this image.
droneattachment.jpg
 
Thanks, back from vacation. That fixed that. But I think I need to change the rot and direction. AS noted in this image.
To get that you want to have dir=_V(0,-1,0) and rot=_V(0,0,1) (or rot=_V(1,0,0) ) with the arm extended. That would translate into dir=_V(0,0,1) and rot=_V(0,1,0) (or rot=_V(1,0,0) ) when the arm is in its initial state. So in your initial definition of claw:
Code:
claw[POS] = _V(-.139,.096,.224);
claw[DIR] = claw[POS] + _V(0,0,1);
claw[ROT] = claw[POS] + _V(0,1,0);
 
I made those changes and still no luck in changing direction and rot of the attachment point.
I even tried this and no change

claw[POS] = _V(-.139,.096,.224);
claw[DIR] = claw[POS] + _V(0,1,0);
claw[ROT] = claw[POS] + _V(0,0,1);
 
Perhaps have a look at the direction and rotation of the attachment point on the cylinder vessel. That may be the problem.
 
I got it with:
claw[POS] = _V(-.139,.096,.224);
claw[DIR] = _V(-.139,.096,.224+1.0);
claw[ROT] = _V(-.139,.096+1.0,.224);

It is coded to fully extend on key command. Haven't seen any RMS coding to get the 2 joints to move at different angle.
 
I got it with:
claw[POS] = _V(-.139,.096,.224);
claw[DIR] = _V(-.139,.096,.224+1.0);
claw[ROT] = _V(-.139,.096+1.0,.224);
Which is the same my post above:
Code:
claw[DIR] = claw[POS] + _V(0,0,1);
claw[ROT] = claw[POS] + _V(0,1,0);
It is coded to fully extend on key command. Haven't seen any RMS coding to get the 2 joints to move at different angle.
You can code whatever key combinations you like to either move the joints together or independently. Any part of your code can control an animation, it is just a matter of setting the appropriate animation state.
 
Thanks. I have tried this to move the joint independ of each other but it had issues. I may just leave it as fully extended.

{

//GUN

double db = simdt * LIFT_SPEED;

if (ARM_proc > 1) ARM_proc = 1;
else if (ARM_proc < 0) ARM_proc = 0;

if (ARM_check == ARM_LEFT)ARM_proc = (ARM_proc + db);
else if (ARM_check == ARM_RIGHT)ARM_proc = (ARM_proc - db);
else if (ARM_check == ARM_STOP)ARM_proc = ARM_proc;

SetAnimation (anim_ARM01, ARM_proc);


}
}





case OAPI_KEY_1: // rotate+
if (ARM_check == ARM_STOP) ARM_check = ARM_RIGHT;
else if (ARM_check == ARM_RIGHT) ARM_check = ARM_STOP;
else if (ARM_check == ARM_LEFT) ARM_check = ARM_RIGHT;
return 1;

case OAPI_KEY_2: // rotate-
if (ARM_check == ARM_STOP) ARM_check = ARM_LEFT;
else if (ARM_check == ARM_LEFT) ARM_check = ARM_STOP;
else if (ARM_check == ARM_RIGHT) ARM_check = ARM_LEFT;
return 1;[/code]
 
Thanks. I have tried this to move the joint independ of each other but it had issues. I may just leave it as fully extended.
Code:
...
SetAnimation (anim_ARM01, ARM_proc);
...
You are only setting the parent animation. You would need to control the child animation also.
 
Back
Top