luis
01-02-2007 20:38:16
looking at the code in Body:
i dont see the point of normalize and then multiply with the lenght, since the normalize isn't free in the CPU......
would be good to have something like:
void body::setLinearVelocity(Ogre::Vector3 direction, Ogre::Real velocity) {
NxVec3 vel = NxTools::convert(direction);
vel.normalize();
vel *= velocity;
mActor->setLinearVelocity(vel);
}
i dont see the point of normalize and then multiply with the lenght, since the normalize isn't free in the CPU......
would be good to have something like:
void body::setLinearVelocity(Ogre::Vector3 velocity) {
NxVec3 vel = NxTools::convert(velocity);
mActor->setLinearVelocity(vel);
}