Simulate
Simulate the world. If deltaTime is zero then only contact and trigger events will be updated and no velocity or position integration or constraint updates will occur.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
Simulate(float)
Simulate the world. If is zero then only contact and trigger events will be updated and no velocity or position integration or constraint updates will occur.
deltaTimepublic void Simulate(float deltaTime)
Parameters
The amount of time to forward simulate the world.
Simulate(ReadOnlySpan<PhysicsWorld>, float)
Simulate a batch of worlds. If is zero then only contact and trigger events will be updated and no velocity or position integration or constraint updates will occur. The worlds can be simulated concurrently depending on the setting of _concurrentSimulations.
deltaTimepublic static void Simulate(ReadOnlySpan<PhysicsWorld> worlds, float deltaTime)
Parameters
The worlds to forward simulate.
The amount of time to forward simulate the world.