Clicking on diferent parts of an object

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
frarauj
Posts: 2
Joined: Wed Sep 24, 2008 7:46 pm

Clicking on diferent parts of an object

Post by frarauj »

Hi, this is my first post so here it goes,

I just started working with Irrlicht for a Augmented Reality project using a multi-touch display, in my project the user will have displayed in a glass an veicle, and he has to be able to touch diferent parts of the model and see diferent things happening, like touch the door will open it and stuff...

is there any function at irrlicht that map the object's parts so it could list wich part the user is clicling on?

thanks guys!
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Not really no...

There's a few approaches you could do to getting it working...

If, in your modelling program, you build to car as seperate groups (but export into one file) and each different group has its own texture then each group of the model will be loaded into a seperate mesh buffer and so then you could do some collision detection to find which mesh buffer was touched.

Or you could model the car as seperate groups and export them as seperate files, one file for each group and then load them in and position them into a car shape and then do the collision detection on the seperate nodes you created form the seperate models. That would basically be the easiest approach.
Image Image Image
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You can also attach hitboxes to joints or some how place them relative to the model. You also need to think about how to open the door etc, so your model needs to provide some mechanisms to alter it.
Post Reply