SetTransformTarget(PhysicsTransform, float)
Set the _linearVelocity and _angularVelocity to reach the specified transform in the specified time. The resultant transform will be closed by may not be exact. This is designed ideally for Kinematic bodies but will work with Dynamic bodies if nothing changes the assigned velocities. This will be ignored if the calculated _linearVelocity and _angularVelocity would be below the _sleepThreshold. This will automatically wake the body if it is asleep.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
public void SetTransformTarget(PhysicsTransform transform, float deltaTime)
Parameters
The transform target for the body.
The timer over which to calculate the required velocities to move to the transform.