Table Of Contents

Previous topic

motion.Spring

Next topic

motion.Velocity

This Page

motion.util

Constructor

class motion.util()

Methods

inertia(pres)
Arguments:
  • pres (object) –
Returns:

the moment of inertia of an object, usually a presence or visible, as it it interpreted by the motion library. Looks for an ‘inertia’ field of the object; if one isn’t present, assigns a default value of 2/5 * mass * scale^2 (as if it were a solid sphere).

Return type:

number

mass(pres)
Arguments:
  • pres (object) –
Returns:

the mass of an object, usually a presence or visible, as it is interpreted by the motion library. First attempts to retrieve the mass from its physics properties, then looks for a ‘mass’ field of the object. If neither of these are present, assigns a default value of 1 kg.

Return type:

number