I've been able to successfully overwrite the methods in the IEventReceiver from the other posts and tutorials to create my own event handler.
I run into a problem when I try to do this the same way for the camera.
If I:
- Code: Select all
class DiffCamera : public ICameraSceneNode
{
public:
void setRotation(const core::vector3df& rotation)
{
//something different
}
};
it will only call setRotation if I am creating an instance of DiffCamera. However, I cannot seem to create an instance of DiffCamera unless I overwrite the ISceneManager with something like:
- Code: Select all
class DiffSceneManager : public ISceneManager
{
public:
virtual DiffCamera* addCameraSceneNode(ISceneNode* parent = 0,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& lookat = core::vector3df(0,0,100),
s32 id=-1, bool makeActive=true) = 0;
};
since the standard ISceneManager will not add a camera of my type. But if I do that, then the IrrlichtDevice won't return my scene manager type unless I override that one as well.
Creating a variation of IrrlichtDevice isn't working. What can I do so that I may change that single function to do my own thing?



