Collision detection by bge+sensor

Hello again to everybody.
I’ve been reading another post about collissions, using callbacks, just to get some inspiration to achieve what I want now. Since I need to detect a continuous collision between 2 objects I created this test file which should change the color of one object. The target is to detect when it collides with a Softbody which has a certain material.

In this test I’m using 2 collision sensors,prepared to detect a collision with a certain material, but I dont know why it never gets the positive pulse. I think the best way is using the collision sensor because I need it to work along all the surface of the detector,thats why I dont use rayCast or Ray sensor(I’ve tried them). Thanks a lot for your time.

CollsionScriptTest.blend (504 KB)

For some reason the collision sensor doesn’t work with soft body objects. A work around would be to parent sensor objects with collision sensors to the spheres and use those to detect when they collide with the cube.

I’m sorry but I didnt understand your point, could you explain it better please? I’ve tried to detect the collision from the softbody attaching a sensor to it but it didnt work.

You need to create a separate object, set its physics type to Sensor, give it a collision sensor, and parent it to the soft body object.

Thanks for your answer. Finally it worked, the problem is that in thest worked but in the main project it won’t, because the SoftBodyObject is a deformable tentacle where I want to detect a continous collision betwen the tentacle and another object. Since the tentacle is deforming all the time I cant append this sensor in an accurate way. Sad…