기술 자료

Unity Engine

Unity Engine

SetTransform

Set the Transform position without causing a PhysicsEvents.TransformChangeEvent to be generated by default. See PhysicsWorld.RegisterTransformChange.
읽는 시간 1분최근 업데이트: 한 달 전

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

transform

The transform to change.

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.

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

transform

The transform to change.

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.