PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience
Collapse Sidebar

EasingStyle

Pose

PoseEasingStyle

The EasingStyle determines the ‘style’ of the interpolation. Along with Pose/EasingDirection, it determines how the joint will interpolate from this Pose to the subsequent Pose during animation playback.

##Pose EasingStyle Values

  • Linear - Linear interpolation
  • Constant - Does not interpolate but snaps to the next pose. The point at which this occurs is determined by Pose/EasingDirection.
    • In - Happens immediately
    • Out - Happens at the time of the next pose
    • InOut - Happens at the midpoint between poses
  • Elastic - Springs back and overshoots the target in an elastic manner
  • Cubic - Cubic interpolation, speed changes as target nears
  • Bounce - Bounces several times before reaching the target

enter image description here

Note, this property is a Enum/PoseEasingStyle, which is different to the Enum/EasingStyle used by other objects. Attempting to set this property to an Enum/EasingStyle value will produce an error.

##Pose Interpolation

The Pose/CFrame of each Pose determines the Motor6D/Transform of the joint associated with the pose at the time of its parent Keyframe. It does not reach this value instantly, but interpolates from the previous pose applied to that joint (which may not necessarily be in the previous keyframe).

The way in which a joint will interpolate between two Poses during animation playback is determined by the Pose/EasingStyle and EasingDirection of the first pose.


Code Samples


Keyframe Add/Remove Pose

This sample demonstrates quickly the Keyframe.AddPose, Keyframe.RemovePose and Pose.AddSubPose and Pose.RemoveSubPose functions. Note these are functionally equivalent to parenting and un-parenting the poses.

local keyframe = Instance.new("Keyframe", workspace)

local pose = Instance.new("Pose")
pose.EasingStyle = Enum.PoseEasingStyle.Cubic
pose.EasingDirection = Enum.PoseEasingDirection.Out
local pose2 = Instance.new("Pose")
pose2.EasingStyle = Enum.PoseEasingStyle.Cubic
pose2.EasingDirection = Enum.PoseEasingDirection.Out

keyframe:AddPose(pose) -- pose.Parent = keyframe

wait(2)

keyframe:RemovePose(pose) -- pose.Parent = nil 

wait(2)

keyframe:AddPose(pose) -- pose.Parent = keyframe

wait(2)

pose:AddSubPose(pose2) -- pose2.Parent = pose

wait(2)

pose:RemoveSubPose(pose2) -- pose2.Parent = nil