Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


PhysicsBody.TransformWriteTween

Used to define a Transform write "tween" for a body.
Read time 2 minutesLast updated 8 days ago

Definition

  • Type: Struct
  • Namespace: Unity.U2D.Physics
  • Assembly: UnityEngine.PhysicsCore2DModule
public struct PhysicsBody.TransformWriteTween

Properties

Property

Description

angularVelocityThe angular velocity of the body to be used during the lifetime of the tween, in degrees per second. This is typically used when the _transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate.
bodyThe body to be used during the lifetime of the tween.
linearVelocityThe linear velocity of the body to be used during the lifetime of the tween. This is typically used when the _transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate.
physicsTransformThe physics transform to be used during the lifetime of the tween. When the _transformWriteMode is PhysicsBody.TransformWriteMode.Interpolate, this defines the target pose to move to. When the _transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate, this defines the source pose to move from.
positionFromThe start position of the tween. When the _transformWriteMode is PhysicsBody.TransformWriteMode.Current, this is set to the last _position. but is not used. When the _transformWriteMode is PhysicsBody.TransformWriteMode.Interpolate, this is set to the last _position. When the _transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate, this will be calculated from _physicsTransform. See _position.
rotationFromThe start rotation of the tween. When the _transformWriteMode is PhysicsBody.TransformWriteMode.Current, this is set to the last _rotation but is not used. When the _transformWriteMode is PhysicsBody.TransformWriteMode.Interpolate, this is set to the last _rotation. When the _transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate, this will be calculated from _physicsTransform. See _rotation.
transformThe Transform to be used during the lifetime of the tween.
transformDepthThe depth of the Transform in the hierarchy where zero is the root. When the _transformTweenMode is anything other than PhysicsWorld.TransformTweenMode.Parallel, all PhysicsBody.TransformWriteTween are sorted into ascending depth order so that writing the transforms in tween order will result in the deeper children correctly overwriting any parent transform writes. This is NOT set when the _transformTweenMode is set to PhysicsWorld.TransformTweenMode.Parallel and will be zero.
transformWriteModeThe transform write mode to be used during the lifetime of the tween. Anything other than PhysicsBody.TransformWriteMode.Interpolate or PhysicsBody.TransformWriteMode.Extrapolate will be removed.

Methods

Method

Description

GetExtrapolatedPoseGet the extrapolated pose for the current write tween.
GetInterpolatedPoseGet the interpolated pose for the current write tween.
GetPoseGet the write pose for the current write tween.