This shows you the differences between two versions of the page.
— |
physics_determinism [2021/05/20 22:12] (current) 73.95.178.156 created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Physics Determinism ====== | ||
+ | |||
+ | ===== Limited Determinism ===== | ||
+ | |||
+ | Unity uses the PhysX engine for physics((Unless you are using the Entities preview Physics packages, which support a new Unity Physics Engine and Havok)), and because of this, Unity physics provides [[https:// | ||
+ | |||
+ | If a game executes the exact same set of physics API calls using the exact same frame timing, the engine will be perfectly deterministic, | ||
+ | |||
+ | Recreating the Physics World((this can be done using the Unity scene load APIs)) will allow you to replay the exact same behavior a second time. | ||
+ | |||
+ | ===== Local Determinism ===== | ||
+ | |||
+ | There are no guarantees for determinism without recreating the physics world or restarting the game session. However, under the same forces and collider setup, //most// systems in PhysX are deterministic within a game session. This could be called "Local Determinism": | ||
+ | |||
+ | Some systems that are known to break local determinism: | ||
+ | * Using the Freeze Rotation / Freeze Position controls on a Rigidbody. | ||
+ | |||