Questions about Collision System in Irrlicht

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
Squarefox
Competition winner
Posts: 118
Joined: Tue Aug 19, 2008 6:46 pm
Location: Delta quadrant, Borg nexus 0001
Contact:

Questions about Collision System in Irrlicht

Post by Squarefox »

Hello,

i've a few questions about the collision system in Irrlicht. I want to create a 3rd-Pearson-Action-Adventure.

1.) Is it possible to select which objects are collsion objects? I.E. do I have to put all these objects in one triangle selector and then attach it to the collisions-response-animator of my character-model?

2.) Can I use every object for collision: terrain generated by the terrain generator and stuff like that?

3.) How do I implement ladders and stairs and hills to climb (terrain that is not exactly flat but you could walk over it)

4.) Is it possible to set the maximum angle which you can climb over? (e.g. 20 degrees)

Greetings,
Squarefox
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: Questions about Collision System in Irrlicht

Post by rogerborg »

Bear in mind that Irrlicht is a 3D engine, not a game engine, so its collision detection is fairly limited and general-purpose. Let's see what we can do...
Squarefox wrote:1.) Is it possible to select which objects are collsion objects? I.E. do I have to put all these objects in one triangle selector and then attach it to the collisions-response-animator of my character-model?
You can add multiple triangle selectors into a meta triangle selector and use it as though it were a single triangle selector. This is fine for simple cases, but it has the limitation that the collision methods don't tell you which individual triangle selector or scene node you've collided with.
Squarefox wrote:2.) Can I use every object for collision: terrain generated by the terrain generator and stuff like that?
Yes. There's a specific method to create a triangle selector from terrain, which you can use just like any other triangle selector (individually, or adding it to a meta triangle selector).
Squarefox wrote:3.) How do I implement ladders and stairs and hills to climb (terrain that is not exactly flat but you could walk over it)
Irrlicht doesn't provide methods to do that, at least not directly or explicitly. Depending on the parameters of the collision response animator that you're using, you can bump up stairs. There's no support for ladders or nuanced hills i.e hills that would slow you down: you will either be able to climb them, or not.
Squarefox wrote:4.) Is it possible to set the maximum angle which you can climb over? (e.g. 20 degrees)
There's no easy way to set that. Whether a collision response animator will allow you to climb a given slope is a function of gravity and the size and shape of the collision ellipse.

Also, Irrlicht doesn't provide surface information e.g. traction values, or clues that would tell you what visual or SFX to produce when an actor walks on that surface.

However, what Irrlicht does provide you with is the basic triangle data that you can:

1) Pass to a 3rd party physics engine, of which there are a plethora: please search the forums for many, many previous discussions about which one is best for your purposes.

2) Do it yourself. All the source code to Irrlicht comes in the SDK, and you can (respecting the zlib license) write application code based on (e.g.) Irrlicht's collision response animator.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

rogerborg pretty much said it all ,although the collision functions of the engine is not that useless their not what u want for precise controll and functionality when it comes down to decent physics and collision , in a case like that your better off using a physics engine like newton or other. i myself busy with a 3rd person type game and currently switching to newton , the collision response animator was fine for testing and worked okay but just wont cut it for what i want
compulsive compiler
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Johan wrote:the collision functions of the engine is not that useless
Are you reading another thread? I don't see anyone in here saying that Irrlicht collision detection is "useless".
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

im not saying anyone did ,im stating that im not putting it off as useless .geez whats the problem . ek dink ek moet wai hier die plek begin my gatvol maak
compulsive compiler
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

OK, I'll try to be more tolerant of cavalier sentence construction in future. :P
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

rogerborg ,i mean no harm .think i should say pls excuse ma english. im not english speaking im afrikaans .
compulsive compiler
Post Reply