physics.getMKS()

类型 函数
physics.*
返回值 数字
修订 版本 2024.3703
关键词 MKS 单位,物理
另请参阅 physics.setMKS()

概述

获取特定键的物理模拟的 MKS 值。

语法

physics.getMKS( key )
(必填)

字符串. 要获取其 MKS 单位的键。可以是以下任意值

  • "velocityThreshold" — 对应于 b2_velocityThreshold
  • "timeToSleep" — 对应于 b2_timeToSleep
  • "linearSleepTolerance" — 对应于 b2_linearSleepTolerance
  • "angularSleepTolerance" — 对应于 b2_angularSleepTolerance

示例

local vt_mks = physics.getMKS( "velocityThreshold" )