Skip to content
Divran edited this page Apr 22, 2021 · 4 revisions

Jump to table of contents

Bone

Bone = Entity:bone(Number Index)

Returns Es Nth bone (3 ops)

Array = Entity:bones()

Returns an array containing all of Es bones. This array's first element has the index 0! (3 ops)

Number = Entity:boneCount()

Returns Es number of bones (3 ops)

Bone = nobone()

Returns an invalid bone (1 ops)

Entity = Bone:entity()

Returns the entity B belongs to (1 ops)

Number = Bone:index()

Returns Bs index in the entity it belongs to. Returns -1 if the bone is invalid or an error occured (1 ops)

Vector = Bone:pos()

Returns Bs position (1 ops)

Vector = Bone:forward()

Returns a vector describing Bs forward direction (1 ops)

Vector = Bone:right()

Returns a vector describing Bs right direction (1 ops)

Vector = Bone:up()

Returns a vector describing Bs up direction (1 ops)

Vector = Bone:vel()

Returns Bs velocity (1 ops)

Vector = Bone:velL()

Returns Bs velocity in local coordinates (1 ops)

Vector = Bone:toWorld(Vector Pos)

Transforms V from local coordinates (as seen from B) to world coordinates (1 ops)

Vector = Bone:toLocal(Vector Pos)

Transforms V from world coordinates to local coordinates (as seen from B) (1 ops)

Angle = Bone:angVel()

Returns Bs angular velocity (1 ops)

Vector = Bone:angVelVector()

Returns rotation axis, velocity and direction given as the vector's direction, magnitude and sense (1 ops)

Angle = Bone:angles()

Returns Bs pitch, yaw and roll angles (1 ops)

Number = Bone:bearing(Vector Pos)

Gets the bearing from the bone to the vector (1 ops)

Number = Bone:elevation(Vector Pos)

Gets the elevation from the bone to the vector (1 ops)

Angle = Bone:heading(Vector Pos)

Gets the elevation and bearing from the bone to the vector (1 ops)

Number = Bone:mass()

Returns Bs mass (1 ops)

Vector = Bone:massCenter()

Returns Bs Center of Mass (1 ops)

Vector = Bone:massCenterL()

Returns Bs Center of Mass in local coordinates (1 ops)

Bone:setMass(Number Mass)

Sets the mass of the bone (between 0.001 and 50,000) (1 ops)

Vector = Bone:inertia()

Gets the principal components of Bs inertia tensor in the form vec(Ixx, Iyy, Izz) (1 ops)

Bone:applyForce(Vector Force)

Applies force to the bone according to the given vector's direction and magnitude (30 ops)

Bone:applyOffsetForce(Vector Force, Vector Pos)

Applies force to the bone according to the first vector from the location of the second (30 ops)

Bone:applyAngForce(Angle Angforce)

Applies torque to the bone according to the given angle (30 ops)

Bone:applyTorque(Vector Torque)

Applies torque to the bone according to the given vector, representing the torque axis, magnitude and direction (30 ops)

Number = Bone:isFrozen()

Returns 1 if B is frozen, 0 otherwise (2 ops)

Bone:boneGravity(Number Gravity)

Enables/disables gravity on the bone. (10 ops)

String = toString(Bone B)

Converts bone to string (10 ops)

Expression 2 ⚛️

Tutorials (In learning order) 🎓

Extras ❔

Tools 🛠️

Click To Expand

Advanced

Beacon 💡

Control 🎛️

Data 💿

Detection 👀

Display 💻

Render

I/O 🔌

Physics 🚀

Utilities 🛠️

RFID

Wireless 🛜

Gates 🚥

Click To Expand

TBD

Clone this wiki locally