yuriythebest
10-02-2008 17:31:32
how do I access the bounding box for a body?
yuriythebest
10-02-2008 17:31:32
Arcanor
10-02-2008 17:44:54
betajaen
10-02-2008 17:53:45
for (Actor* actor = actors->begin(); actor = actors->next();) {
if (actor->isDynamic()) {
if (actor->getGlobalPositionAsNxVec3().y <= 0 ) {
NxVec3 globalPose = actor->getGlobalPositionAsNxVec3();
Shape* s = actor->getCollisionModel().Get(Actor::CollisionModel::First);
NxBounds3 bounds;
s->getNxShape()->getWorldBounds(bounds);
globalPose.y = 0.025f + ((bounds.max.y - bounds.min.y) * 0.5f);
actor->getNxActor()->setGlobalPosition(globalPose);
}
}
}
Arcanor
10-02-2008 18:13:51
yuriythebest
10-02-2008 18:29:25