bool ISceneNode::OnPreDetachChild(NodePtr pNode) { // Node is about to become part of the world, so let's leave it exactly where it is pNode->SetLocalPosition(pNode->GetPosition()); return true; }
bool ISceneNode::OnPreAttachChild(NodePtr pNode) { // Make it so that the child remains where it was in the world pNode->SetLocalPosition(pNode->GetPosition() - GetPosition()); return true; }