Collision Response

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
Trip42
Posts: 10
Joined: Sun Jun 06, 2004 9:49 pm

Collision Response

Post by Trip42 »

I'm working on a program that will simulate battles between two computer controlled characters. I would like to use Irrlicht to render these battles. But I have some questions on how the program should be structured.

Lets say one of the characters is moving along and hits a fence. I would like the character to go into the "climb over fence" animation. But I'm not 100% sure how to set this up. I would need to create a selector for the fence, but that's about as far I can get.

The collision tutorial has shows uses the ISceneNodeAnimatorCollisionResponse to make the camera react to a collision. Is this what I should be doing? Making a custom ISceneNodeAnimator?

Basically what I would like is a way to set callbacks when a collision occurs. For example character1 collided with a fence so the character objects climbFence method gets called, or character1 hit collided with character2 call both of their attack methods.

The collision tutorial seems to be targetted towards first person shooters which is not what I am making. If anyone can point me at some code I would greatly appreciate it.

Thank you,
-Brian
Post Reply