FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Contact Sensor

3 posters

Go down

Contact Sensor Empty Contact Sensor

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

Back to top Go down

Contact Sensor Empty Re: Contact Sensor

Post  Jawdy 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.
Jawdy
Jawdy

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

http://www.gaslightgames.co.uk

Back to top Go down

Contact Sensor Empty Re: Contact Sensor

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

Back to top Go down

Contact Sensor Empty Re: Contact Sensor

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

Posts : 73
Join date : 2008-10-12

Back to top Go down

Contact Sensor Empty Re: Contact Sensor

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

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