fastCollisionsAllowed
Treat this body as high speed object that performs continuous collision detection against dynamic and kinematic bodies, but not other high speed bodies. Fast collision bodies should be used sparingly, not because they are slow but because everything using fast collisions does not work well. They are not a solution for general dynamic-versus-dynamic continuous collision. They also may interfere with joint constraints.
Read time 1 minuteLast updated 12 days ago
Definition
- Type: Property
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public bool fastCollisionsAllowed { get; set; }
Remarks
The 2D physics system already uses continuous collision detection automatically to prevent tunneling when dynamic bodies approach static bodies. If a very fast-moving object still passes through another object, set this property to to force fast collision detection. Enabling this setting can reduce performance, so use it only for the bodies that need it.
true