- Home /
Triggers create but never destroy contacts.
Hi,
I've set up a simple scene with some rigid bodies and a trigger zone. I'm watching the physics output in the profiler and the 'Number of Contacts' goes up by 1 when a rigid body enters the trigger zone. What gets me is the number of contacts is not reduced when the rigid body exits the trigger zone.
The result is there eventually accumulates hundreds of contacts (according to the profiler). Is this normal or is something strange going on here?
No code required. Create a new scene, add a trigger zone and place a rigidbody above it. Let gravity pull the rigidbody through the trigger. Watch the profiler and you'll see the number of contacts will go from 0 to 1 and never return to 0.
I see this in the editor all the time - if a rigidbody has a trigger region and a hard collider overlapping (e.g. a player neighborhood trigger around the player body) the profiler shows an ever-increasing contact leak every fixed update.
Answer by David St-Hilaire · Jun 09, 2011 at 04:02 PM
I'm observer the same thing in my game... Does this mean the contact points are leaking? or is it just a number indicating the number of contacts that occured so far?
hmm not really an answer... should've maybe but this as a comment above x_x'
I have no idea. It's a question best answered by the Unity guys.
Your answer
Follow this Question
Related Questions
Profiling mysterious "Phase Core: Trigger Interaction Work" 1 Answer
Physics.Simulate is taking my 90% of GPU and CPU for A 2d GAME 1 Answer
Moving Colliders giving me Physics.simulate spikes in Profiler 2 Answers
Physics.simulate chews CPU but not using physics at all - Am I? 2 Answers
Profile physics.simulate 1 Answer