THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 21/07/2004 at 03:45, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 6
Platform: Mac ;
Language(s) : C.O.F.F.E.E ;
---------
Bonjour
I want to drive the rotation of an object (a bone) by the rotation of an other object (a bone) but I want to controle the rotation on X Y and Z independently.
I have write this :
main(doc,op)
{
var a = 1.00;
var b = 1.00;
var c = 1.00;
var tg = doc->FindObject("Os bras G"); if(!tg) return;
var mo = op->GetMg(); //position globale de l'os tagué
var mt = tg->GetMg(); //position globale de l'os pilote
var Roto = mt->GetHPB(); //rotation globale de l'os pilote
var xo = RotX( ); // compiler : variable or function expected
var yo = RotY( );
var zo = RotZ( );
var pos = mo->GetV0();
var scale = vector(vlen(mo->GetV1()),
vlen(mo->GetV2()),
vlen(mo->GetV3()));
mo->SetRotX(xo * a);
mo->SetRotY(yo * b);
mo->SetRotZ(zo * c);
mo->SetV0(pos);
mo->SetV1(vnorm(mo->GetV1()) * scale.x);
mo->SetV2(vnorm(mo->GetV2()) * scale.y);
mo->SetV3(vnorm(mo->GetV3()) * scale.z);
op->SetMg(mo);
return;
}
When I compile, on the line
var xo = RotX( );
it display : variable or function expected. I don't understand what I have to do.
Bests regards
( Sorry for my english, I am french)