Notifications
Clear all

[Closed] Biped COM linked and setTransform

When a biped is linked to other object (ctdmaster here), this code doesn’t work.
If I move the parent, and run this code after that, the biped return to previous position.


 bipobj = $Bip01
ctdmaster = $ctdmaster
  bipTM = bipobj.transform
  bipobj.parent = ctdmaster
  biped.setTransform bipobj #pos bipTM.translationpart true
  biped.setTransform bipobj #rotation bipTM.rotationpart true
  biped.setTransform bipobj #scale bipTM.scalepart true
 

Just repeating the setTransform sentence and everything goes right:


bipobj = $Bip01
  ctdmaster = $ctdmaster
  bipTM = bipobj.transform
  bipobj.parent = ctdmaster
  biped.setTransform bipobj #pos bipTM.translationpart true
  biped.setTransform bipobj #rotation bipTM.rotationpart true
  biped.setTransform bipobj #scale bipTM.scalepart true
 biped.setTransform bipobj #pos bipTM.translationpart true

Please tell me why and it there is a better way to do it.
thanks

1 Reply

sorry, it doesn’t work ;-(

What I need is that the biped stay in place when relinked.