Skip to main content

Bone

Internal class for all bones

Caution:

Changes to the syntax in this class will not count to the major version in semver.

Properties

Bone

This item is read only and cannot be modified. Read Only
Bone.Bone: Bone

FreeLength

Bone.FreeLength: number

Weight

Bone.Weight: number

ParentIndex

This item is read only and cannot be modified. Read Only
Bone.ParentIndex: number

HeirarchyLength

This item is read only and cannot be modified. Read Only
Bone.HeirarchyLength: number

Transform

Bone.Transform: CFrame

LocalTransform

Bone.LocalTransform: CFrame

RootPart

This item is read only and cannot be modified. Read Only
Bone.RootPart: BasePart

RootBone

This item is read only and cannot be modified. Read Only
Bone.RootBone: Bone

Radius

Bone.Radius: number

Friction

Bone.Friction: number

RotationLimit

Bone.RotationLimit: number

Force

Bone.Force: Vector3?

Gravity

Bone.Gravity: Vector3?

SolvedAnimatedCFrame

Bone.SolvedAnimatedCFrame: boolean

Describes if this bone has already solved its animated world cframe, this is used for optimization.

HasChild

Bone.HasChild: boolean

AnimatedWorldCFrame

This item is read only and cannot be modified. Read Only
Bone.AnimatedWorldCFrame: CFrame

Bone.TransformedWorldCFrame

StartingCFrame

Bone.StartingCFrame: CFrame

TransformOffset

This item is read only and cannot be modified. Read Only
Bone.TransformOffset: CFrame

LocalTransformOffset

This item is read only and cannot be modified. Read Only
Bone.LocalTransformOffset: CFrame

RestPosition

This item is read only and cannot be modified. Read Only
Bone.RestPosition: Vector3

CalculatedWorldCFrame

This item is read only and cannot be modified. Read Only
Bone.CalculatedWorldCFrame: CFrame

Position

Bone.Position: Vector3

Internal representation of the bone

LastPosition

Bone.LastPosition: Vector3

Internal representation of the bone's position last frame

WeldPosition

Bone.WeldPosition: Vector3

WeldCFrame

Bone.WeldCFrame: CFrame

ActiveWeld

Bone.ActiveWeld: boolean

Describes if this bone has a weld

RigidWeld

Bone.RigidWeld: boolean

If the bone has a weld, is it rigid

Anchored

Bone.Anchored: boolean

AxisLocked

Bone.AxisLocked: {
boolean,
boolean,
boolean
}

XYZ order

XAxisLimits

Bone.XAxisLimits: NumberRange

YAxisLimits

Bone.YAxisLimits: NumberRange

ZAxisLimits

Bone.ZAxisLimits: NumberRange

IsSkippingUpdates

Bone.IsSkippingUpdates: boolean

CollisionHits

Bone.CollisionHits: {}

CollisionData

Bone.CollisionData: {}

Debug property, holds information about the collisions that the bone had this frame

Functions

ClipVelocity

Bone:ClipVelocity(
PositionVector3,
VectorVector3
) → ()

Clips velocity on specified vector, Position is where we are at our current physics step (Before we set self.Position)

PreUpdate

Bone:PreUpdate(BoneTreeBoneTree) → ()

StepPhysics

Bone:StepPhysics(
BoneTreeBoneTree,
ForceVector3,
Deltanumber--

Δt

) → ()

Force passed in via BoneTree:StepPhysics()

Constrain

Bone:Constrain(
BoneTreeBoneTree,
ColliderObjectsVector3,
Deltanumber--

Δt

) → ()

SkipUpdate

Bone:SkipUpdate() → ()

Returns bone to rest position

SolveTransform

Bone:SolveTransform(
BoneTreeBoneTree,
Deltanumber--

Δt

) → ()

Solves the cframe of the bones

ApplyTransform

Bone:ApplyTransform(BoneTreeBoneTree) → ()

Sets the world cframes of the bones to the calculated world cframe (solved in Bone:SolveTransform())

DrawDebug

This item only works when running on the client. Client
Bone:DrawDebug(
BoneTreeany,
DRAW_CONTACTSboolean,
DRAW_PHYSICAL_BONEboolean,
DRAW_BONEboolean,
DRAW_AXIS_LIMITSboolean,
DRAW_ROTATION_LIMITboolean
) → ()

DrawOverlay

This item only works when running on the client. Client
Bone:DrawOverlay(OverlayImOverlay) → ()
Show raw api
{
    "functions": [
        {
            "name": "ClipVelocity",
            "desc": "Clips velocity on specified vector, Position is where we are at our current physics step (Before we set self.Position)\r",
            "params": [
                {
                    "name": "Position",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Vector",
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 512,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "PreUpdate",
            "desc": "",
            "params": [
                {
                    "name": "BoneTree",
                    "desc": "",
                    "lua_type": "BoneTree"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 518,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "StepPhysics",
            "desc": "Force passed in via BoneTree:StepPhysics()\r",
            "params": [
                {
                    "name": "BoneTree",
                    "desc": "",
                    "lua_type": "BoneTree"
                },
                {
                    "name": "Force",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Delta",
                    "desc": "Δt",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 577,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Constrain",
            "desc": "",
            "params": [
                {
                    "name": "BoneTree",
                    "desc": "",
                    "lua_type": "BoneTree"
                },
                {
                    "name": "ColliderObjects",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "Delta",
                    "desc": "Δt",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 613,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "SkipUpdate",
            "desc": "Returns bone to rest position\r",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 668,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "SolveTransform",
            "desc": "Solves the cframe of the bones\r",
            "params": [
                {
                    "name": "BoneTree",
                    "desc": "",
                    "lua_type": "BoneTree"
                },
                {
                    "name": "Delta",
                    "desc": "Δt",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 683,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "ApplyTransform",
            "desc": "Sets the world cframes of the bones to the calculated world cframe (solved in Bone:SolveTransform())\r",
            "params": [
                {
                    "name": "BoneTree",
                    "desc": "",
                    "lua_type": "BoneTree"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 722,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "DrawDebug",
            "desc": "",
            "params": [
                {
                    "name": "BoneTree",
                    "desc": "",
                    "lua_type": "any"
                },
                {
                    "name": "DRAW_CONTACTS",
                    "desc": "",
                    "lua_type": "boolean"
                },
                {
                    "name": "DRAW_PHYSICAL_BONE",
                    "desc": "",
                    "lua_type": "boolean"
                },
                {
                    "name": "DRAW_BONE",
                    "desc": "",
                    "lua_type": "boolean"
                },
                {
                    "name": "DRAW_AXIS_LIMITS",
                    "desc": "",
                    "lua_type": "boolean"
                },
                {
                    "name": "DRAW_ROTATION_LIMIT",
                    "desc": "",
                    "lua_type": "boolean"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 763,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "DrawOverlay",
            "desc": "",
            "params": [
                {
                    "name": "Overlay",
                    "desc": "",
                    "lua_type": "ImOverlay"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 954,
                "path": "src/Components/Bone.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Bone",
            "desc": "",
            "lua_type": "Bone",
            "readonly": true,
            "source": {
                "line": 316,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "FreeLength",
            "desc": "",
            "lua_type": "number",
            "source": {
                "line": 319,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Weight",
            "desc": "",
            "lua_type": "number",
            "source": {
                "line": 322,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "ParentIndex",
            "desc": "",
            "lua_type": "number",
            "readonly": true,
            "source": {
                "line": 326,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "HeirarchyLength",
            "desc": "",
            "lua_type": "number",
            "readonly": true,
            "source": {
                "line": 330,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Transform",
            "desc": "",
            "lua_type": "CFrame",
            "source": {
                "line": 333,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "LocalTransform",
            "desc": "",
            "lua_type": "CFrame",
            "source": {
                "line": 336,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "RootPart",
            "desc": "",
            "lua_type": "BasePart",
            "readonly": true,
            "source": {
                "line": 340,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "RootBone",
            "desc": "",
            "lua_type": "Bone",
            "readonly": true,
            "source": {
                "line": 344,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Radius",
            "desc": "",
            "lua_type": "number",
            "source": {
                "line": 347,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Friction",
            "desc": "",
            "lua_type": "number",
            "source": {
                "line": 350,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "RotationLimit",
            "desc": "",
            "lua_type": "number",
            "source": {
                "line": 353,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Force",
            "desc": "",
            "lua_type": "Vector3?",
            "source": {
                "line": 356,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Gravity",
            "desc": "",
            "lua_type": "Vector3?",
            "source": {
                "line": 359,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "SolvedAnimatedCFrame",
            "desc": "Describes if this bone has already solved its animated world cframe, this is used for optimization.\r",
            "lua_type": "boolean",
            "source": {
                "line": 363,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "HasChild",
            "desc": "",
            "lua_type": "boolean",
            "source": {
                "line": 366,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "AnimatedWorldCFrame",
            "desc": "Bone.TransformedWorldCFrame\r",
            "lua_type": "CFrame",
            "readonly": true,
            "source": {
                "line": 371,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "StartingCFrame",
            "desc": "",
            "lua_type": "CFrame",
            "source": {
                "line": 374,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "TransformOffset",
            "desc": "",
            "lua_type": "CFrame",
            "readonly": true,
            "source": {
                "line": 378,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "LocalTransformOffset",
            "desc": "",
            "lua_type": "CFrame",
            "readonly": true,
            "source": {
                "line": 382,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "RestPosition",
            "desc": "",
            "lua_type": "Vector3",
            "readonly": true,
            "source": {
                "line": 386,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "CalculatedWorldCFrame",
            "desc": "",
            "lua_type": "CFrame",
            "readonly": true,
            "source": {
                "line": 390,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Position",
            "desc": "Internal representation of the bone\r",
            "lua_type": "Vector3",
            "source": {
                "line": 394,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "LastPosition",
            "desc": "Internal representation of the bone's position last frame\r",
            "lua_type": "Vector3",
            "source": {
                "line": 398,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "WeldPosition",
            "desc": "",
            "lua_type": "Vector3",
            "source": {
                "line": 401,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "WeldCFrame",
            "desc": "",
            "lua_type": "CFrame",
            "source": {
                "line": 404,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "ActiveWeld",
            "desc": "Describes if this bone has a weld\r",
            "lua_type": "boolean",
            "source": {
                "line": 408,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "RigidWeld",
            "desc": "If the bone has a weld, is it rigid\r",
            "lua_type": "boolean",
            "source": {
                "line": 412,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "Anchored",
            "desc": "",
            "lua_type": "boolean",
            "source": {
                "line": 415,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "AxisLocked",
            "desc": "XYZ order\r",
            "lua_type": "{ boolean, boolean, boolean }",
            "source": {
                "line": 419,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "XAxisLimits",
            "desc": "",
            "lua_type": "NumberRange",
            "source": {
                "line": 422,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "YAxisLimits",
            "desc": "",
            "lua_type": "NumberRange",
            "source": {
                "line": 425,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "ZAxisLimits",
            "desc": "",
            "lua_type": "NumberRange",
            "source": {
                "line": 428,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "IsSkippingUpdates",
            "desc": "",
            "lua_type": "boolean",
            "source": {
                "line": 431,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "CollisionHits",
            "desc": "",
            "lua_type": "{}",
            "source": {
                "line": 434,
                "path": "src/Components/Bone.lua"
            }
        },
        {
            "name": "CollisionData",
            "desc": "Debug property, holds information about the collisions that the bone had this frame\r",
            "lua_type": "{}",
            "source": {
                "line": 438,
                "path": "src/Components/Bone.lua"
            }
        }
    ],
    "types": [],
    "name": "Bone",
    "desc": "Internal class for all bones\n:::caution Caution:\nChanges to the syntax in this class will not count to the major version in semver.\n:::\r",
    "source": {
        "line": 312,
        "path": "src/Components/Bone.lua"
    }
}