Hi Luc,
maybe it is simply a copy error but you should use getId2() instead of getId1() twice.
if(  !(Body::byId(I->getId1())->isDynamic) ||
> !(Body::byId(I->getId2())->isDynamic)  ) continue;

Cheers,

Franck


How would you do to skip non dynamic bodies in a loop over interactions?

I tried

FOREACH(const shared_ptr<Interaction>& I, *scene->interactions){
             if(  !(Body::byId(I->getId1())->isDynamic) ||
!(Body::byId(I->getId1())->isDynamic)  ) continue;
}

but, obviously, I missed something...


_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to