The Collision Manager

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

This is useful for beginners

Yes
2
50%
No
2
50%
 
Total votes: 4

Maize
Posts: 163
Joined: Sat Oct 29, 2005 12:12 am
Location: In a cave...
Contact:

The Collision Manager

Post by Maize »

A lot of people ask how to detect collisions with many objects using Irrlicht functions. A lot of those posts dont get exact answers though. Hopefully with this project, no one will ask how anymore. I have written a collision manager class which is an easy, light, and fast way to add collision handling to your project. The zip file includes the files and a sample test bed for it. If you have any problems with it, post them and I will try to help you out. The sample was written in Visual C++6 so you will need the appropriate irrlicht dll to compile and run it which wasnt included because of the filesize. In conclusion, there should be no reason for anyone to ask how to do collision with irrlicht anymore.

http://s-fonline.com/webhosting/frobaz/ ... anager.zip

The sample also wont run on linux since I use GetAsyncKeyState for input. This can easily be changed though.
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

I might be wrong but dont they want 'collision detection' like a call back that they know that something collides? to check for exampel if a bullet hit something? cause this thing is like just the basic collision manager of irrlicht. and it doesnt have a value to return.
sudi
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
Maize
Posts: 163
Joined: Sat Oct 29, 2005 12:12 am
Location: In a cave...
Contact:

Post by Maize »

Well a lot of people asked how to do that so there ya go. I never really said you HAD to use it.
omaremad_

Post by omaremad_ »

@sudi you can use the ray to bounding box collision test for bullets assumeing bullets are very fast


some times it doesnt work well on deled maps so i had to rely on the get position from 2d screen coordinate
codebox
Posts: 8
Joined: Thu Nov 03, 2005 10:47 am
Location: Karachi, Pakistan
Contact:

Post by codebox »

thanks but i dont have visual c++.

i downloaded the collision manager files and i tried importing the visual c++ project into Dev c++. It imported successfully. I tweaked to meet the linker requirements and paths, yet i get the following errors :(

-C:\CollisionManager\Collision Manager\Sample\Main.cpp In function `void InitGame()':

-39 C:\CollisionManager\Collision Manager\Sample\Main.cpp no matching function for call to `CObject::LoadObject( CGraphics*&, const char[13], const char[5], irr::core::vector3df,

- error C:\CollisionManager\Collision Manager\Sample\Game.h:36 candidates are: int CObject::LoadObject(CGraphics*, c8*, c8*, irr::core::vector3df&, irr::core::vector3df&, irr::core::vector3df&)

-43 C:\CollisionManager\Collision Manager\Sample\Main.cpp no matching function for call to `CCollision::AttachToNode( irr::scene::ISceneManager*&, irr::scene::ICameraSceneNode*&,

- error C:\CollisionManager\Collision Manager\Sample\Collision.h:27 candidates are: void CCollision::AttachToNode(irr::scene::ISceneManager*,

- C:\CollisionManager\Collision Manager\Sample\Makefile.win [Build Error] [Main.o] Error 1

any help is appreciated :) thanks.
you just need an start, the rest is upto your art
Post Reply