SetTransform
Set the Transform position without causing a PhysicsEvents.TransformChangeEvent to be generated by default. See PhysicsWorld.RegisterTransformChange.
Read time 1 minuteLast updated 11 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
SetTransform(Transform, Vector3, bool)
Set the Transform position without causing a PhysicsEvents.TransformChangeEvent to be generated by default. See PhysicsWorld.RegisterTransformChange.
public static void SetTransform(Transform transform, ref Vector3 position, bool transformChangedEvent = false)
Parameters
SetTransform(Transform, Vector3, Quaternion, bool)
Set the Transform position and rotation without causing a PhysicsEvents.TransformChangeEvent to be generated. See PhysicsWorld.RegisterTransformChange.
public static void SetTransform(Transform transform, ref Vector3 position, ref Quaternion rotation, bool transformChangedEvent = false)
Parameters
The transform to change.
The global position to set the transform to.
The global rotation to set the transform to.
By default, no transform changed event will be produced however this behaviour can be overridden with this argument.