Simulate
Simulate the world. The world should must have its PhysicsWorld.simulationType set to PhysicsWorld.SimulationType.Script for this to work.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: UnityEngine.LowLevelPhysics2D
- Assembly: UnityEngine.Physics2DModule
Simulate(float)
Simulate the world. The world should must have its PhysicsWorld.simulationType set to PhysicsWorld.SimulationType.Script for this to work.
public void Simulate(float deltaTime)
Parameters
The amount of time to forward simulate the world.
Simulate(ReadOnlySpan<PhysicsWorld>, float)
Simulate a batch of worlds. The worlds can be simulated concurrently depending on the setting of PhysicsLowLevelSettings2D.concurrentSimulations. The worlds in the batch must have their PhysicsWorld.simulationType set to PhysicsWorld.SimulationType.Script.
public static void Simulate(ReadOnlySpan<PhysicsWorld> worlds, float deltaTime)
Parameters
The worlds to forward simulate.
The amount of time to forward simulate the world.