Contact Sensor

View previous topic View next topic Go down

Contact Sensor

Post  collisionality on Sun Mar 29, 2009 2:57 pm

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
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

View user profile

Back to top Go down

Re: Contact Sensor

Post  Jawdy on Mon Mar 30, 2009 8:37 am

Really check Tutorial06_1 and _2 over and over - there's stuff about the camera's collision in there that would probably help.
avatar
Jawdy

Posts : 65
Join date : 2009-03-17
Location : UK

View user profile http://www.gaslightgames.co.uk

Back to top Go down

Re: Contact Sensor

Post  collisionality on Tue Mar 31, 2009 9:17 am

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

View user profile

Back to top Go down

Re: Contact Sensor

Post  sw on Tue Mar 31, 2009 11:04 am

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.

Laughing Laughing Laughing trust me, you get the collision WHEN you hit some physic things tongue tongue
avatar
sw

Posts : 73
Join date : 2008-10-12

View user profile

Back to top Go down

Re: Contact Sensor

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum