# 7. Physics Pitfalls Part of [[Physics 3D]]. Previous: [[6. Worked Example Pushable Prop]]. Hub: [[Physics 3D]]. ## 7.1 Tunneling **Symptom:** Fast projectile / vehicle passes through a thin wall. **Causes:** Discrete collision + high speed + thin colliders ([CCD modes](https://docs.unity3d.com/6000.5/Documentation/Manual/physics-optimization-cpu-rigidbody-collision-modes.html)). **Mitigations:** Thicken colliders; Continuous Speculative on the fast body; Continuous against static world; Continuous Dynamic only for critical pairs; lower Fixed Timestep only if you accept CPU cost globally. ## 7.2 Sleeping forever **Symptom:** Platform or conveyor moved via Transform does not wake contacts. **Fix:** Kinematic Rigidbody + `MovePosition`, or explicit `WakeUp` ([[1. Rigidbody Fundamentals]], Manual sleep notes). ## 7.3 Non-uniform / huge scale **Symptom:** Jittery contacts, inaccurate MeshColliders, weird inertia. **Fix:** Scale meshes in DCC; keep Rigidbody GameObjects near scale (1,1,1); compound primitives beat scaled meshes. ## 7.4 CCD everywhere **Symptom:** Spikes in `Physics.Simulate` / CPU timeline. **Fix:** Discrete default; Speculative/Continuous sparingly; profile before teaching "just turn on Continuous Dynamic." ## 7.5 Transform vs Rigidbody ownership **Symptom:** Rubber-banding, ignored teleports, joint explosions. **Fix:** One owner. Dynamic → forces. Kinematic → `MovePosition`. After rare Transform cheats with interpolation on → `Physics.SyncTransforms()` ([interpolation Manual](https://docs.unity3d.com/6000.5/Documentation/Manual/rigidbody-interpolation.html)). ## 7.6 MeshCollider on dynamic body without Convex **Symptom:** Runtime error / no collision response. **Fix:** Enable **Convex**, or use compounds ([configure colliders](https://docs.unity3d.com/6000.5/Documentation/Manual/rigidbody-configure-colliders.html)). ## 7.7 Query vs collision matrix confusion **Symptom:** Raycast hits an enemy you cannot collide with (or vice versa). **Fix:** Remember masks ≠ matrix ([[3. Layers Matrix and Queries]]). Document both in the project README. ## 7.8 Allocating queries in FixedUpdate **Symptom:** GC spikes. **Fix:** `*NonAlloc` APIs with persistent buffers ([RaycastNonAlloc](https://docs.unity3d.com/6000.5/Documentation/ScriptReference/Physics.RaycastNonAlloc.html)). ## 7.9 Mixing root motion and dynamic Rigidbody **Symptom:** Feet slide, double movement. **Fix:** Pick a motion owner ([[Animation]], [[5. Forces FixedUpdate and Motion Modes]]). ## 7.10 Networking Rigidbodies casually **Symptom:** Desync, fighting authorities. **Fix:** Read [[Multiplayer with Netcode for GameObjects]] before replicating every prop. ## 7.11 See also - [[Car Controller]] — WheelCollider-specific pitfalls - [[Surface-Walking with an Omnidirectional Player Movement]] — ground adhesion edge cases - [[Architecture and Code Patterns]] — keep physics services testable