bone animation - bone_rotate

Posted By: Schloder87

bone animation - bone_rotate - 10/06/08 19:14

got a problem with my bone_rotate. if i press left_mouse(actoin1_key) i can let the bone rotate, but how is it makeable that the bone goes smooth to this root position?

HERES THE CODE


if((movementType == typeMouseOrKeyboard && (Key_Pressed(action1_key_scancode) )))
{


// Bonebewegung für Bogen
camera_tilt = bone_ang.tilt; // Neue Angaben für tilt-Bewegung des Kopfes
camera_tilt = clamp(camera_tilt,-80,80); // Neue Angaben für tilt-Bewegung des Kopfes

bone_ang.tilt = -(pointer.y - 400) / 10;
bone_ang.tilt = clamp(bone_ang.tilt, -80,80);
bone_ang.roll = 0;

ent_bonerotate(my,"Bip01_Spine1", bone_ang);

my.moveMode = punch;

}
Posted By: Stansmedia

Re: bone animation - bone_rotate - 10/08/08 06:50

before your ent_bonerotate you need to reset the bone before you rotate it otherwise it will just continually add the value every frame. Im guessing nothing is happening or its going all crazy.

you'de be amazed how useful the manuel can be. press F1 in script editor.

// Bonebewegung für Bogen
camera_tilt = bone_ang.tilt;
camera_tilt = clamp(camera_tilt,-80,80);

bone_ang.tilt = -(pointer.y - 400) / 10; // maybe this needs
bone_ang.tilt = clamp(bone_ang.tilt, -80,80); //re evaluation?
bone_ang.roll = 0; // not sure, i cant exactly test this

ent_bonereset(my,"Bip01_Spine1");
ent_bonerotate(my,"Bip01_Spine1", bone_ang);

my.moveMode = punch;
© 2024 lite-C Forums