alternative joint manipulation then setLocalRot()?

madheadcrashmadheadcrash Posts: 0

Hello,

is there an other way to manipulate joints than the function setLocalRot() / setWSRot() ?
Is there a way to set directly maybe a value e.g. shoulder twist?

With the documentation I got only to this solution:

QString lShoulder = "lShldr";
DzNode *nodeLeft = dzScene->findNodeByLabel(lShoulder);
DzRotationOrder order(0,1,0);
DzVec3 rotVecL(20.0f*DZ_FLT_DEG_TO_RAD,-20.0f*DZ_FLT_DEG_TO_RAD,-25.0f*DZ_FLT_DEG_TO_RAD);
DzQuat locRot3L(order,rotVecL);
nodeLeft->setLocalRot(locRot3L);
Post edited by madheadcrash on

Comments

  • rbtwhizrbtwhiz Posts: 1,598
    edited December 1969

    Do you mean, like setting values on the properties displayed to the user in the Parameters/Posing pane?

    DzNode *nodeLeft = dzScene->findNodeByLabel( "lShldr" );
    if( nodeLeft )
    {
     DzFloatProperty *xRotProp = nodeLeft->getXRotControl();
     xRotProp->setValue( 20.0f );
    
     DzFloatProperty *yRotProp = nodeLeft->getYRotControl();
     yRotProp->setValue( -20.0f );
    
     DzFloatProperty *zRotProp = nodeLeft->getZRotControl();
     zRotProp->setValue( -25.0f );
    }

    -Rob

  • madheadcrashmadheadcrash Posts: 0
    edited December 1969

    Yes, that was it what I searched for. Thanks a lot!

Sign In or Register to comment.