rojo/.cursor/rules/roblox/reference/engine/classes/RotationCurve.yaml
2026-02-02 12:08:47 -06:00

216 lines
6.3 KiB
YAML

# This file is automatically generated. Please don't edit it manually.
# To submit a bug report on the content, see
# https://devforum.roblox.com/c/bug-reports/documentation-issues/72
name: RotationCurve
type: class
memory_category: Instances
summary: |
Represents a sequence of rotations and the interpolation curve between them.
description: |
This class holds a sorted list of
`Datatype.RotationCurveKey|RotationCurveKeys` that represent a sequence of
rotations. The shape of the interpolation curve between two keys is determined
by the `Datatype.RotationCurveKey.Interpolation` type.
code_samples: []
inherits:
- Instance
descendants: []
tags: []
deprecation_message: ''
properties:
- name: RotationCurve.Length
summary: |
Number of rotation keys in this curve.
description: |
Number of rotation keys in this curve.
code_samples: []
type: int
tags:
- ReadOnly
- NotReplicated
deprecation_message: ''
security:
read: None
write: None
thread_safety: ReadSafe
category: Data
serialization:
can_load: false
can_save: true
capabilities:
- Basic
methods:
- name: RotationCurve:GetKeyAtIndex
summary: |
Returns a copy of a key at a given index.
description: |
Returns a copy of a key at a given index.
code_samples: []
parameters:
- name: index
type: int
default:
summary: ''
returns:
- type: RotationCurveKey
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- Basic
- name: RotationCurve:GetKeyIndicesAtTime
summary: |
Returns the index of the last and first key of a period of time.
description: |
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).
code_samples: []
parameters:
- name: time
type: float
default:
summary: ''
returns:
- type: Array
summary: ''
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- Basic
- name: RotationCurve:GetKeys
summary: |
Returns a copy of all the keys in the rotation curve as a Luau array of
`Datatype.RotationCurveKey|RotationCurveKeys`.
description: |
Returns a copy of all the keys in the rotation curve as a Luau array of
`Datatype.RotationCurveKey|RotationCurveKeys`.
code_samples: []
parameters: []
returns:
- type: Array
summary: |
Array of `Datatype.RotationCurveKey|RotationCurveKeys`.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- Basic
- name: RotationCurve:GetValueAtTime
summary: |
Samples the rotation curve at a given time and returns the corresponding
rotation as a `Datatype.CFrame`.
description: |
Samples the rotation curve at a given time and returns the corresponding
rotation as a `Datatype.CFrame`. Empty rotation curves are evaluated as
`Datatype.CFrame.identity`.
code_samples: []
parameters:
- name: time
type: float
default:
summary: |
Time at which to sample the curve.
returns:
- type: CoordinateFrame?
summary: |
Value of the curve at the requested `time`.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- Basic
- name: RotationCurve:InsertKey
summary: |
Adds the key passed as an argument to this curve. If a key at the same
time is found, it will be replaced.
description: |
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.
code_samples: []
parameters:
- name: key
type: RotationCurveKey
default:
summary: |
`Datatype.RotationCurveKey` to insert.
returns:
- type: Array
summary: |
(see description) .
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- Basic
- name: RotationCurve:RemoveKeyAtIndex
summary: |
Removes a given number of keys starting from a given index.
description: |
Removes a given number (`count`) of keys starting from the `startingIndex`
index and returns the number of keys that were removed.
code_samples: []
parameters:
- name: startingIndex
type: int
default:
summary: |
Starting index from which to remove keys.
- name: count
type: int
default: 1
summary: |
Number of keys to remove.
returns:
- type: int
summary: |
Number of keys removed.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- Basic
- name: RotationCurve:SetKeys
summary: |
Resets this curve's keys using the `Datatype.RotationCurveKey` array
passed as an argument.
description: |
Resets this curve's keys using the `Datatype.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.
code_samples: []
parameters:
- name: keys
type: Array
default:
summary: |
Array of `Datatype.RotationCurveKey|RotationCurveKeys`.
returns:
- type: int
summary: |
Number of keys inserted.
tags: []
deprecation_message: ''
security: None
thread_safety: Unsafe
capabilities:
- Basic
events: []
callbacks: []