Collision question.

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
FleshCrawler
Posts: 108
Joined: Fri Aug 22, 2003 1:04 pm
Location: Kerkrade, Netherlands
Contact:

Collision question.

Post by FleshCrawler »

i'm working on collision detection for my program. but it gives me a weird error

error C2440: '=' : cannot convert from 'class irr::scene::ISceneNode *' to 'class irr::scene::IAnimatedMeshSceneNode *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast


i got no idea what this means :(

but its on this part of the code -> node1 = smgr->addOctTreeSceneNode(mesh1->getMesh(0));
unknown_usr
Posts: 14
Joined: Thu Oct 02, 2003 7:03 pm

Post by unknown_usr »

node1 has to be declared as "ISceneNode*" :shock:
FleshCrawler
Posts: 108
Joined: Fri Aug 22, 2003 1:04 pm
Location: Kerkrade, Netherlands
Contact:

Post by FleshCrawler »

hmm...according to your reaction this aint right, got any solution plz? :)
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Unfortunately, you can't do a simple C-style recast because the data structure behind a ISceneNode pointer and a IAnimatedSceneNode pointer is different.

I don't remember offhand what the solution is to get a mesh loaded into the OctTree like that, but I believe it has been posted before. If it's unanswered when I get home, I'll see if I can figure out the solution.
Crud, how do I do this again?
FleshCrawler
Posts: 108
Joined: Fri Aug 22, 2003 1:04 pm
Location: Kerkrade, Netherlands
Contact:

Post by FleshCrawler »

ok, thanks :)

its because i'm a newbie in programming, i dont got any books, just learning all from other sources and such.
Post Reply