Hey,
I'm using the CollisionResponseAnimator on a simple SMesh with a Sphere.
The SMesh is representing a Shape and is updating constantly. I use an MetaTriangleSelector which gets updated with the SMesh.
So far everything works good but there is only 1 thing missing.
I need to get a notifaction when there is a collision of the sphere and my SMesh. Because later on, the players health and score is depending on that.
So i need a way to execute some functions when there is a collision or at least get some kind of feedback.
I looked in the API but didnt find a solution.
Maybe you guys can help me
Thanks a lot
Greetz
Teemo
Edit: I use no gravity... the sphere is flying over the ground.
CollisionResponseAnimator Notification ?
CollisionResponseAnimator Notification ?
Last edited by Teemo on Sun Jan 04, 2009 10:29 pm, edited 1 time in total.
You need to implement to kinds of collision, the first is broad-phase which looks at bounding boxes, that will filter only shapes that are colliding. From there you can generate collision pairs and you will know where shapes will bounce off after collision.
For example, you can try adding an updatePhysics member function in a SceneNode that figure the broad-phase, then set a flag when a collision occurs.
In my case, I did not code my own collision as I don't have the skills, so I simply used a physics library instead.
For example, you can try adding an updatePhysics member function in a SceneNode that figure the broad-phase, then set a flag when a collision occurs.
In my case, I did not code my own collision as I don't have the skills, so I simply used a physics library instead.

-
rogerborg
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
There's no functionality to do this at the moment. If you add a Feature Request to the tracker, then it's something that I'd be interested in looking into when I have time.
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
hhm... too bad :-/
Maybe somebody has another solution for my problem.
As I said , the shape is representing the player who gets captured via webcam.
Then there will be some flying objects. I need to check if they collide with the shape. It's not that important to know where the collsion happend ... it's important to know that an collision happend and with which object. Then we need tocheck the status of our object (if it was in kill-mode or get-killed-mode).
Greetings T
Maybe somebody has another solution for my problem.
As I said , the shape is representing the player who gets captured via webcam.
Then there will be some flying objects. I need to check if they collide with the shape. It's not that important to know where the collsion happend ... it's important to know that an collision happend and with which object. Then we need tocheck the status of our object (if it was in kill-mode or get-killed-mode).
Greetings T