Scaleform Studio Lua API Reference: scaleform.physics.RevoluteJoint object reference

scaleform.physics.RevoluteJoint object reference

Description

A revolute joint that allows two bodies to revolve around a shared point.

Functions

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

number

The joint angle.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

number

The joint speed.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

boolean

Returns true if limits are enabled and false otherwise.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

scaleform.Point

The anchor point.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

scaleform.Point

The anchor point.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

number

The lower limit.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

number

The maximum motor torque.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

boolean

Whether the motor is working.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

number

The speed of the motor.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

inv_dt :

number

The inverse time step.

Returns

number

The torque on the joint motor.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

inv_dt :

number

The inverse time step.

Returns

number

The reaction force.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

inv_dt :

number

The inverse time step.

Returns

number

The reaction torque.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

number

The angle between bodies.

Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

lower :

number

The lower limit.

upper :

number

The upper limit.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

enable :

boolean

A flag to enable/disable the limits of the joint.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

torque :

number

The motor torque.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

enable :

boolean

A flag to start/stop the joint motor.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

speed :

number

The motor speed.

Returns
This function does not return any values.
Parameters

self :

scaleform.physics.RevoluteJoint

The revolute joint currently in use.

Returns

number

The upper limit.

 scaleform.physics.Joint
An interface for the physics properties of the joint between two physics bodies.
 scaleform.physics.RevoluteJoint.joint_angle (self) : number
Returns the current joint angle in radians.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 number  scaleform.physics.RevoluteJoint
A revolute joint that allows two bodies to revolve around a shared point.
A numeric value.  scaleform.physics.RevoluteJoint.joint_speed (self) : number
Returns the current joint speed.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 number  scaleform.physics.RevoluteJoint.limit_enabled (self) : boolean
Check whether the joint limits are enabled.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 booleantrue or false.  scaleform.physics.RevoluteJoint.local_anchor_a (self) : scaleform.Point
Returns the local anchor point relative to body A.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 scaleform.Point
The anchor point.
 scaleform.Point
Point should be in the form of a table {x=a, y=b}
{ PropertyType : string, x : number, y : number, }
 scaleform.physics.RevoluteJoint.local_anchor_b (self) : scaleform.Point
Returns the local anchor point relative to body A.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 scaleform.Point
The anchor point.
 scaleform.physics.RevoluteJoint.lower_limit (self) : number
Returns the lower limit of the joint.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 number  scaleform.physics.RevoluteJoint.max_motor_torque (self) : number
Gets the maximum torque for the joint motor.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 number  scaleform.physics.RevoluteJoint.motor_enabled (self) : boolean
Checks if the joint motor is enabled and working.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 boolean  scaleform.physics.RevoluteJoint.motor_speed (self) : number
Gets the speed for the joint motor.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 number  scaleform.physics.RevoluteJoint.motor_torque (self, inv_dt) : number
Gets the torque on the joint motor.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 inv_dt : number
The inverse time step.
 number  scaleform.physics.RevoluteJoint.reaction_force (self, inv_dt) : number
Gets the reaction force given the inverse time step.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 inv_dt : number
The inverse time step.
 number  scaleform.physics.RevoluteJoint.reaction_torque (self, inv_dt) : number
Gets the reaction torque given the inverse time step.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 inv_dt : number
The inverse time step.
 number  scaleform.physics.RevoluteJoint.reference_angle (self) : number
Returns the constrained angle between the bodies.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 number  scaleform.physics.RevoluteJoint.set_limits (self, lower, upper)
Set the joint limits.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 lower : number
The lower limit.
 upper : number
The upper limit.
 scaleform.physics.RevoluteJoint.set_limit_enabled (self, enable)
Enables the joint limits.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 enable : boolean
A flag to enable/disable the limits of the joint.
 scaleform.physics.RevoluteJoint.set_max_motor_torque (self, torque)
Sets the maximum torque for the joint motor.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 torque : number
The motor torque.
 scaleform.physics.RevoluteJoint.set_motor_enabled (self, enable)
Enables the joint motor.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 enable : boolean
A flag to start/stop the joint motor.
 scaleform.physics.RevoluteJoint.set_motor_speed (self, speed)
Sets the motor speed of the joint.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 speed : number
The motor speed.
 scaleform.physics.RevoluteJoint.upper_limit (self) : number
Returns the upper limit of the joint.
 self : scaleform.physics.RevoluteJoint
The revolute joint currently in use.
 numberA string of characters.Indicates a table.
This documentation uses the term table to mean an anonymous, temporary Lua table that contains named data values. You typically use these tables to pass data or settings to a function, or to hold data returned by a function.
Indicates an object.
This documentation uses the term object to mean a named Lua table or userdata value that maintains a state. Some object types may have multiple instances existing at the same time, each with its own state; these objects typically have creation functions or accessors that you must call in order to get an instance. Some object types have only one instance, which you always access through the object's name.
Indicates a named variable within a namespace, object or table; or an element within an enumeration.Indicates a code sample.Indicates an enumeration.
This documentation uses the term enumeration to mean a named Lua table that contains only a set of constant values. These values typically identify a predefined set of options for some setting or behavior. You might pass an enumeration value to a function, or test the value returned by a function against the items in the enumeration to see which option is currently set.
Indicates a named variable within a namespace or object that has a pre-set constant value.Indicates a category: a semantic grouping of related API elements.Indicates a namespace.
This documentation uses the term namespace to mean a named Lua table that exists in only one single instance, intended as a container for an interface of related objects, functions and data variables.
Indicates an output value returned by a function.Indicates a named function within a namespace or object.Indicates an input parameter for a function.