In the terrain function i use
Code: Select all
// create event receiver
MyEventReceiver receiver(terrain);
device->setEventReceiver(&receiver);
Code: Select all
MyEventReceiver receiver;
device->setEventReceiver(&receiver);
The constructor that I already make
Code: Select all
class MyEventReceiver : public IEventReceiver
{
public:
MyEventReceiver(scene::ISceneNode* terrain)
{
Terrain = terrain;
}
}
error C2512: 'MyEventReceiver' : no appropriate default constructor available
[/code]