CFrameTrackModule
Module for CFrameTrack
Functions
clampToTrackLength
CFrameTrackModule.clampToTrackLength(position: number,length: number,isCircuited: boolean?) → number--
resulting position
Clamps the given position in range of [0, length] or [0, length) if isCircuited.
Includes length unlike modulus.
getHasPassedTrackEnd
CFrameTrackModule.getHasPassedTrackEnd(position: number,length: number,isCircuited: boolean?) → (number--
resulting clamped position
)Returns the direction which the given position passes the end of the track line. Also returns the clamped position. See clampToTrackLength for more info.
createFromInstance
Creates a CFrameTrack from an Instance. Returns a Result.
- Note: Instance must have a
StringValuenamedTrackClass! - Info on how to construct an Instance for each track is located in the .fromInstance constructor docs of each class.
Valid TrackClass Values
| Value | CFrameTrack |
|---|---|
PointToPoint |
PointToPointCFrameTrack |
PointToPoint2 |
PointToPoint2CFrameTrack |
Hinge |
HingeCFrameTrack |
MovingSection |
MovingSectionCFrameTrack |
LerpedPoints |
LerpedPointsCFrameTrack |
TweenedPoints |
TweenedPointsCFrameTrack |
Offset |
OffsetCFrameTrack |
Point |
PointCFrameTrack |
RobloxAnimation |
RobloxAnimationCFrameTrack |
RobloxAnimationPose |
RobloxAnimationPoseCFrameTrack |
isInstance
Checks if Instance contains a StringValue named "TrackClass"