Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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
deltaTime
is zero then only contact and trigger events will be updated and no velocity or position integration or constraint updates will occur.
public void Simulate(float deltaTime)

Parameters

deltaTime

The amount of time to forward simulate the world.

Simulate(ReadOnlySpan<PhysicsWorld>, float)

Simulate a batch of worlds. If
deltaTime
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.
public static void Simulate(ReadOnlySpan<PhysicsWorld> worlds, float deltaTime)

Parameters

The worlds to forward simulate.

deltaTime

The amount of time to forward simulate the world.