Deep practical guide to PhysicsSystem in Space Station 14: simulation device (broadphase, contacts, islands, solver), connection with Transform/Container/Anchoring, client prediction part and working application patterns. Use it when you need to understand how physics actually works and where it is safe to embed game logic.
This skill covers the architecture and mental model of PhysicsSystem :)
For the full directory of the public API, see the separate skill SS14 Physics System API.
Physics in SS14 is convenient to think of as a pipeline of 6 layers:
PhysicsComponentBodyType, CanCollide, speed, damping, mass, sleep, etc.FixturesComponentlayer/mask/hard, material parameters.Start/Touching/End.Key idea:
Set*, Apply*, RegenerateContacts, WakeBody), and not through direct component fields ✅Typical step (including substeps):
PhysicsUpdateBeforeSolveEvent.FindNewContacts).CollideContacts) and events Start/EndCollide.Step -> integration of speeds -> constraints -> positions).PhysicsUpdateAfterSolveEvent.Practical conclusion:
PhysicsSystem is tightly connected to the transform hierarchy:
CanCollide = false, the speeds are reset to zero.Consequence:
General:
Differences:
ApplyLinearImpulse / ApplyAngularImpulse.ApplyForce / ApplyTorque.SetBodyType (+ if necessary SetCanCollide, SetFixedRotation, SetSleepingAllowed).SetCanCollide or fixture-API (SetCollisionMask/Layer, SetHard).RegenerateContacts.TryGetNearest*, GetWorldAABB, GetHardAABB, ray/intersection query API.CollisionWake: automatically turns off CanCollide for sleeping bodies on the grid (if there are no joints/critical contacts), and turns it back on when waking up.CollideOnAnchor: Binds CanCollide to the anchor/unanchor state.SetCanCollide in 100 places.# Underground/pipe entity: collision is automatically synchronized with anchoring.