Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


SetTransformAccess

Set the TransformAccess position without causing a PhysicsEvents.TransformChangeEvent to be generated. See PhysicsWorld.RegisterTransformChange.
Read time 1 minuteLast updated 9 days ago

Definition

  • Type: Method
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule

SetTransformAccess(TransformAccess, Vector3, bool)

Set the TransformAccess position without causing a PhysicsEvents.TransformChangeEvent to be generated. See PhysicsWorld.RegisterTransformChange.
public static void SetTransformAccess(ref TransformAccess transformAccess, ref Vector3 position, bool transformChangedEvent = false)

Parameters

transformAccess

The TransformAccessused to change the transform.

position

The global position to set the transform to.

transformChangedEvent

By default, no transform changed event will be produced however this behaviour can be overridden with this argument.

SetTransformAccess(TransformAccess, Vector3, Quaternion, bool)

Set the TransformAccess position and rotation without causing a PhysicsEvents.TransformChangeEvent to be generated. See PhysicsWorld.RegisterTransformChange.
public static void SetTransformAccess(ref TransformAccess transformAccess, ref Vector3 position, ref Quaternion rotation, bool transformChangedEvent = false)

Parameters

transformAccess

The TransformAccessused to change the transform.

position

The global position to set the transform to.

rotation

The global rotation to set the transform to.

transformChangedEvent

By default, no transform changed event will be produced however this behaviour can be overridden with this argument.