I have a car that uses the vehicle wrapper and I want it to make a sound on hitting certain objects. The objects are actors with Rigid Body physics and collision bounds. The car is also set to rigid body physics and has collision bounds. However, although the car collides with the objects and car push them about or knock them over, no sound is played. I have added a hit counter to the collision sensor and it remains at zero, suggesting it is not a sound issue but that the sensor is not getting activated.
I have made identical settings with another very simple scene (a box instead of a car) and everything works fine - the sound is played. Back in the full scene, I have tried using convex hull and triangle mesh for the car. I have tried Pulse mode and different combinations of triggering but nothing works with the full scene.
So, does the vehicle wrapper interfere with the vehicle collision in some way or is there some other setting I should try?
Many thanks
I don’t think it should interfere, but if it’s proving to be a problem, then add a larger collision box / mesh around the car that is parented to it, and check for collisions with that object instead. Using the “Show Physics Visualization” tool (in the Game menu) also is very helpful, as it shows where the physics mesh for objects are, though it sounds like the car is behaving correctly from your description.
P.S. Try to keep physics meshes low-poly; if your car mesh is high-poly, don’t use that for physics, but use a simpler model instead.
Thanks for the suggestions. My car was already low-poly and the physics simulation showed that the physics was working (which I knew already from the interactions).
After much fiddling about I had a sudden “Eureka!” moment (quickly followed by a Homer Simpson style “Doh!”). I have my vehicle set up as per the standard vehicle-wrapper tutorial. The tutorial sets up three states. I was adding my collision sensor to the wrong (first - “at rest/car-setup”) state. When I add the collision sensor to the “driving” (power-train or 3rd) state, the collisions sensor works as per expectations. It’s obvious in hind-sight - like most of life.
Problem solved. Apologies for my stupidity!