physics.getMKS()

Type Function
Library physics.*
Return value Number
Revision 2017.3060
Keywords MKS units, physics
See also physics.setMKS()

Overview

Get the MKS value of the physics simulation for specific keys.

Syntax

physics.getMKS( key )
key (required)

String. The key to get MKS units of. Can be any one of the following values:

  • "velocityThreshold" — corresponds to b2_velocityThreshold.
  • "timeToSleep" — corresponds to b2_timeToSleep.
  • "linearSleepTolerance" — corresponds to b2_linearSleepTolerance.
  • "angularSleepTolerance" — corresponds to b2_angularSleepTolerance.

Example

local vt_mks = physics.getMKS( "velocityThreshold" )