RotationCurve

사용되지 않는 항목 표시

This class holds a sorted list of RotationCurveKeys that represent a sequence of rotations. The shape of the interpolation curve between two keys is determined by the RotationCurveKey.Interpolation type.

요약

속성

  • 읽기 전용
    복제되지 않음
    병렬 읽기

    Number of rotation keys in this curve.

메서드

속성

Length

읽기 전용
복제되지 않음
병렬 읽기

Number of rotation keys in this curve.

메서드

GetKeyAtIndex

Returns a copy of a key at a given index.

매개 변수

index: number

반환

GetKeyIndicesAtTime

The first item in the returned array is the index of the last key with time less than or equal to time (or the lesser of either 1 or the curve length if no key was found). The second item in the returned array is the index of the first key with time greater than or equal to time (or the curve length if no key was found satisfying the inequality).

매개 변수

time: number

반환

GetKeys

Returns a copy of all the keys in the rotation curve as a Lua array of RotationCurveKeys.


반환

GetValueAtTime

Samples the rotation curve at a given time and returns the corresponding rotation as a CFrame. Empty rotation curves are evaluated as CFrame.identity.

매개 변수

time: number

Time at which to sample the curve.


반환

Value of the curve at the requested time.

InsertKey

Adds the key passed as an argument to this curve. If a key at the same time is found, it will be replaced. In the returned array, the first value is true if a key was added or false if a previous key was replaced; the second value is the index at which the marker was added.

매개 변수


반환

(see description) .

RemoveKeyAtIndex

Removes a given number (count) of keys starting from the startingIndex index and returns the number of keys that were removed.

매개 변수

startingIndex: number

Starting index from which to remove keys.

count: number

Number of keys to remove.

기본값: 1

반환

Number of keys removed.

SetKeys

Resets this curve's keys using the RotationCurveKey array passed as an argument. Keys in the keys array are sorted in ascending time order before insertion, and keys at duplicated times are removed in a stable manner.

Returns the number of keys actually inserted. Keys previously stored in this curve are removed before the keys passed as arguments are added.

매개 변수

keys: Array

반환

Number of keys inserted.

이벤트