Camera & Event Receiver

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Bob Finnie
Posts: 49
Joined: Tue Jan 23, 2007 12:36 pm
Location: Bedford, UK

Camera & Event Receiver

Post by Bob Finnie »

Hi All,

After updating my irrlicht base to 1.5 from 1.3 I noticed the Maya camera has lost its setPosition/setTarget capabilities so I have copied the Maya camera class code+header to my project and now create it by hand like this:

Code: Select all

Camera = new CCameraMayaSceneNode(smgr->getRootSceneNode(),smgr, -1,-500,100,750);
which works fine, however it does not receive any mouse or key events so I can't move it.

How do I 'hook up' the camera event handler to my current event receiver so I can use the camera like before?

Many Thanks you fine folk
Bob
Bob Finnie
Posts: 49
Joined: Tue Jan 23, 2007 12:36 pm
Location: Bedford, UK

Post by Bob Finnie »

Not to worry folks - Solved it.

I needed to change the OnEvent function to:

Code: Select all

 OnEvent(const SEvent &event)
from the original:

Code: Select all

OnEvent(SEvent event)


Hope this helps anyone that may have the same problem

Thanks,
Bob
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Bob Finnie wrote:Hope this helps anyone that may have the same problem
I doubt this as long as they don't do a search like you didn't (there are several posts in the forums asking the same thing) !!! :twisted:
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Bob Finnie
Posts: 49
Joined: Tue Jan 23, 2007 12:36 pm
Location: Bedford, UK

Post by Bob Finnie »

Well actually Acki, I did do a search which is how I solved my problem...
Sometimes however, we don't know what to search for because we don't know what the problem initially is...

Clearly my reply won't help you because you obviously know everything about irrlicht but it was a question in 'Beginners Help' and if it provides another answer to a common question then it's worth the hundred or so bytes of web space.
Post Reply