Ajare
23-01-2007 20:18:17
body::freezeAll works as I expect, which is to say the body stops moving entirely. However unFreezeAll doesn't do anything, nor in fact do any of the unFreeze functions once I've frozen a body. Moreover, when I call unFreezeAll without freezing beforehand, I get an exception.
All I'm doing is
On another note, I notice that the code could be tidied up a bit - you're passing a lot of stuff by value where it'd be better to pass as const references, and using sequential if statements where an if-elseif would be quicker. Something for the todo list?
All I'm doing is
mBody = scene->createBody (name, "", new nxOgre::cubeShape (size, localPos, actorMat), 5, pos);
...
mBody->freezeAll ();
...
mBody->unFreezeAll ();
On another note, I notice that the code could be tidied up a bit - you're passing a lot of stuff by value where it'd be better to pass as const references, and using sequential if statements where an if-elseif would be quicker. Something for the todo list?