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 7 days ago

Definition

public struct PhysicsBody.TransformWriteTween : IEquatable<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 PhysicsBody.TransformWriteTween.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 PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate.
physicsTransformThe physics transform to be used during the lifetime of the tween. When the PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Interpolate, this defines the target pose to move to. When the PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate, this defines the source pose to move from.
positionFromThe start position of the tween. When the PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Current, this is set to the last Transform.position. but is not used. When the PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Interpolate, this is set to the last Transform.position. When the PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate, this will be calculated from PhysicsBody.TransformWriteTween.physicsTransform. See Transform.position.
rotationFromThe start rotation of the tween. When the PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Current, this is set to the last Transform.rotation but is not used. When the PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Interpolate, this is set to the last Transform.rotation. When the PhysicsBody.TransformWriteTween.transformWriteMode is PhysicsBody.TransformWriteMode.Extrapolate, this will be calculated from PhysicsBody.TransformWriteTween.physicsTransform. See Transform.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 PhysicsWorld.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 PhysicsWorld.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.