Contact Sensor
3 posters
Contact Sensor
I would be eternally grateful if someone would post an example of a working contact sensor. I would like to use it to detect when my camera object collides with any other object.
I've created a new contact sensor and a callback method and set collision flags using
But I can't figure out how to check it. Am I at least on the right track? I'm sorry I can't figure this out.
Thanks!
I've created a new contact sensor and a callback method and set collision flags using
- Code:
_btRigidBody->setCollisionFlags( btCollisionObject::CF_CUSTOM_MATERIAL_CALLBACK );
But I can't figure out how to check it. Am I at least on the right track? I'm sorry I can't figure this out.
Thanks!
collisionality- Posts : 4
Join date : 2009-03-28
Location : Cincinnati
Re: Contact Sensor
Really check Tutorial06_1 and _2 over and over - there's stuff about the camera's collision in there that would probably help.
Re: Contact Sensor
Thanks, Jawdy. I've watched and examined the heck out of tutorial 6, and physics is working great. I don't fall through the ground and I can push objects around. What I'm looking for is a way to determine when I'm hitting something so that I can, for example, play a sound. I don't even care what I'm hitting, I just want to know when a collision with my camera object has occurred. This seems like one of those things that should be easy, but I just can't puzzle it out.
collisionality- Posts : 4
Join date : 2009-03-28
Location : Cincinnati
Re: Contact Sensor
collisionality wrote:Thanks, Jawdy. I've watched and examined the heck out of tutorial 6, and physics is working great. I don't fall through the ground and I can push objects around. What I'm looking for is a way to determine when I'm hitting something so that I can, for example, play a sound. I don't even care what I'm hitting, I just want to know when a collision with my camera object has occurred. This seems like one of those things that should be easy, but I just can't puzzle it out.
trust me, you get the collision WHEN you hit some physic things
sw- Posts : 73
Join date : 2008-10-12
Permissions in this forum:
You cannot reply to topics in this forum