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
Questions about Collision System in Irrlicht
-
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
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...
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.
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: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?
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:2.) Can I use every object for collision: terrain generated by the terrain generator and stuff like that?
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:3.) How do I implement ladders and stairs and hills to climb (terrain that is not exactly flat but you could walk over it)
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.Squarefox wrote:4.) Is it possible to set the maximum angle which you can climb over? (e.g. 20 degrees)
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
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
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:
Are you reading another thread? I don't see anyone in here saying that Irrlicht collision detection is "useless".Johan wrote:the collision functions of the engine is not that 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
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
rogerborg
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
OK, I'll try to be more tolerant of cavalier sentence construction in future. 
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way