THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/04/2005 at 22:56, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
---------
How to change object position after the change position value of tag aligntospline in the while circle?
main(doc,op)
{
var obj_master = doc->FindObject("master");
var obj_slave = doc->FindObject("slave");
var pos_master = obj_master->GetMg()->GetV0();
var pos_slave = obj_slave->GetMg()->GetV0();
var pos=0;
var dist=0;
var i=0;
dist=vlen(pos_master-pos_slave);
println("start dist is ",dist);
while ((dist>100)&&(i<15))
{
pos+=0.05;
obj_slave->GetFirstTag()#ALIGNTOSPLINETAG_POSITION=pos;
//******************************************************
//In this point position of "slave" must be changed but it not happened :(
//*****************************************************
pos_master = obj_master->GetMg()->GetV0();
pos_slave = obj_slave->GetMg()->GetV0();
dist=vlen(pos_master-pos_slave);
i++;
println(dist," ",pos);
}
}