Uninomicon

Documenting the dark corners of the Unity Engine.

User Tools

Site Tools


physics_determinism

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/BestPractices.html#determinism|Limited Determinism]]. 
 +
 +If a game executes the exact same set of physics API calls using the exact same frame timing, the engine will be perfectly deterministic, globally.
 +
 +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": determinism that is local to a single area of the game or set of rigidbodies. For example, you can drop multiple balls and they will usually follow the exact same path of bounces.
 +
 +Some systems that are known to break local determinism:
 +  * Using the Freeze Rotation / Freeze Position controls on a Rigidbody.
 +
  
physics_determinism.txt ยท Last modified: 2021/05/20 22:12 by 73.95.178.156