|
@@ -33551,18 +33551,6 @@ return {
|
|
description = "An optional list of collision tags that are \"static\". Colliders with a static tag will not move, and the physics engine uses this for optimization.",
|
|
description = "An optional list of collision tags that are \"static\". Colliders with a static tag will not move, and the physics engine uses this for optimization.",
|
|
default = "{}"
|
|
default = "{}"
|
|
},
|
|
},
|
|
- {
|
|
|
|
- name = "timestep",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The physics timestep, or zero to disable fixed timestep. When fixed timestep is active, any time passed to `World:update` will be accumulated, and the physics simulation will run only when there's as much time as the fixed timestep. This decouples the physics update rate from the rendering rate, which improves stability. Collider poses will be interpolated between the two most recent ticks. Lower values result in more accurate simulation, at the cost of CPU usage. Use zero to disable fixed timestep and directly update the physics simulation when `World:update` is called.",
|
|
|
|
- default = "1 / 60"
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "maxSteps",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The maximum number of physics steps to run during any given call to `World:update`. This can be used to avoid a \"spiral of death\" where the physics engine can't keep up when a large `dt` value is given. Zero means no limit.",
|
|
|
|
- default = "0"
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
name = "maxColliders",
|
|
name = "maxColliders",
|
|
type = "number",
|
|
type = "number",
|
|
@@ -34920,10 +34908,9 @@ return {
|
|
description = "Returns the orientation of the Collider in angle/axis representation.",
|
|
description = "Returns the orientation of the Collider in angle/axis representation.",
|
|
key = "Collider:getOrientation",
|
|
key = "Collider:getOrientation",
|
|
module = "lovr.physics",
|
|
module = "lovr.physics",
|
|
- notes = "When the World is using a fixed timestep, this returns an interpolated orientation between the last two physics updates. Use `Collider:getRawOrientation` to get the raw orientation without any smoothing applied. Alternatively, set the `tickRate` to 0 when creating the world to disable fixed timestep and all collider interpolation.",
|
|
|
|
|
|
+ notes = "If `World:interpolate` has been called, this returns an interpolated orientation between the last two physics updates.",
|
|
related = {
|
|
related = {
|
|
"Collider:applyTorque",
|
|
"Collider:applyTorque",
|
|
- "Collider:getRawOrientation",
|
|
|
|
"Collider:getAngularVelocity",
|
|
"Collider:getAngularVelocity",
|
|
"Collider:setAngularVelocity",
|
|
"Collider:setAngularVelocity",
|
|
"Collider:getPosition",
|
|
"Collider:getPosition",
|
|
@@ -34965,11 +34952,10 @@ return {
|
|
description = "Returns the position and orientation of the Collider.",
|
|
description = "Returns the position and orientation of the Collider.",
|
|
key = "Collider:getPose",
|
|
key = "Collider:getPose",
|
|
module = "lovr.physics",
|
|
module = "lovr.physics",
|
|
- notes = "When the World is using a fixed timestep, this returns an interpolated pose between the last two physics updates. Use `Collider:getRawPose` to get the raw pose without any smoothing applied. Alternatively, set the `tickRate` to 0 when creating the world to disable fixed timestep and all collider interpolation.",
|
|
|
|
|
|
+ notes = "If `World:interpolate` has been called, this returns an interpolated pose between the last two physics updates.",
|
|
related = {
|
|
related = {
|
|
"Collider:getPosition",
|
|
"Collider:getPosition",
|
|
- "Collider:getOrientation",
|
|
|
|
- "Collider:getRawPose"
|
|
|
|
|
|
+ "Collider:getOrientation"
|
|
},
|
|
},
|
|
variants = {
|
|
variants = {
|
|
{
|
|
{
|
|
@@ -35020,10 +35006,9 @@ return {
|
|
description = "Returns the position of the Collider.",
|
|
description = "Returns the position of the Collider.",
|
|
key = "Collider:getPosition",
|
|
key = "Collider:getPosition",
|
|
module = "lovr.physics",
|
|
module = "lovr.physics",
|
|
- notes = "When the World is using a fixed timestep, this returns an interpolated position between the last two physics updates. Use `Collider:getRawPosition` to get the raw position without any smoothing applied. Alternatively, set the `tickRate` to 0 when creating the world to disable fixed timestep and all collider interpolation.",
|
|
|
|
|
|
+ notes = "If `World:interpolate` has been called, this returns an interpolated position between the last two physics updates.",
|
|
related = {
|
|
related = {
|
|
"Collider:applyForce",
|
|
"Collider:applyForce",
|
|
- "Collider:getRawPosition",
|
|
|
|
"Collider:getLinearVelocity",
|
|
"Collider:getLinearVelocity",
|
|
"Collider:setLinearVelocity",
|
|
"Collider:setLinearVelocity",
|
|
"Collider:getOrientation",
|
|
"Collider:getOrientation",
|
|
@@ -35054,138 +35039,6 @@ return {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- {
|
|
|
|
- name = "getRawOrientation",
|
|
|
|
- summary = "Get the raw orientation of the Collider, without any interpolation.",
|
|
|
|
- description = "Returns the raw orientation of the Collider, without any interpolation applied.",
|
|
|
|
- key = "Collider:getRawOrientation",
|
|
|
|
- module = "lovr.physics",
|
|
|
|
- notes = "To disable all interpolation, disable fixed timestep by setting the `tickRate` to 0 when creating the world.",
|
|
|
|
- related = {
|
|
|
|
- "Collider:getOrientation",
|
|
|
|
- "Collider:setOrientation",
|
|
|
|
- "Collider:getRawPosition",
|
|
|
|
- "Collider:getPosition"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {},
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "angle",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The number of radians the Collider is rotated around its axis of rotation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "ax",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The x component of the axis of rotation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "ay",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The y component of the axis of rotation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "az",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The z component of the axis of rotation."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "getRawPose",
|
|
|
|
- summary = "Get the raw pose of the Collider, without any interpolation.",
|
|
|
|
- description = "Returns the position and orientation of the Collider, without any interpolation applied.",
|
|
|
|
- key = "Collider:getRawPose",
|
|
|
|
- module = "lovr.physics",
|
|
|
|
- notes = "To disable all interpolation, disable fixed timestep by setting the `tickRate` to 0 when creating the world.",
|
|
|
|
- related = {
|
|
|
|
- "Collider:getRawPosition",
|
|
|
|
- "Collider:getRawOrientation",
|
|
|
|
- "Collider:getPose"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {},
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "x",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The x position of the Collider, in meters."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "y",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The y position of the Collider, in meters."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "z",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The z position of the Collider, in meters."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "angle",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The number of radians the Collider is rotated around its axis of rotation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "ax",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The x component of the axis of rotation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "ay",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The y component of the axis of rotation."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "az",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The z component of the axis of rotation."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "getRawPosition",
|
|
|
|
- summary = "Get the raw position of the Collider, without any interpolation.",
|
|
|
|
- description = "Returns the raw position of the Collider, without any interpolation applied.",
|
|
|
|
- key = "Collider:getRawPosition",
|
|
|
|
- module = "lovr.physics",
|
|
|
|
- notes = "To disable all interpolation, disable fixed timestep by setting the `tickRate` to 0 when creating the world.",
|
|
|
|
- related = {
|
|
|
|
- "Collider:getPosition",
|
|
|
|
- "Collider:setPosition",
|
|
|
|
- "Collider:getRawOrientation",
|
|
|
|
- "Collider:getOrientation"
|
|
|
|
- },
|
|
|
|
- variants = {
|
|
|
|
- {
|
|
|
|
- arguments = {},
|
|
|
|
- returns = {
|
|
|
|
- {
|
|
|
|
- name = "x",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The x position of the Collider, in meters."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "y",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The y position of the Collider, in meters."
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name = "z",
|
|
|
|
- type = "number",
|
|
|
|
- description = "The z position of the Collider, in meters."
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
{
|
|
{
|
|
name = "getRestitution",
|
|
name = "getRestitution",
|
|
summary = "Get the bounciness of the Collider.",
|
|
summary = "Get the bounciness of the Collider.",
|
|
@@ -36586,9 +36439,6 @@ return {
|
|
"Collider:setOrientation",
|
|
"Collider:setOrientation",
|
|
"Collider:getPose",
|
|
"Collider:getPose",
|
|
"Collider:setPose",
|
|
"Collider:setPose",
|
|
- "Collider:getRawPosition",
|
|
|
|
- "Collider:getRawOrientation",
|
|
|
|
- "Collider:getRawPose",
|
|
|
|
"Collider:getLocalPoint",
|
|
"Collider:getLocalPoint",
|
|
"Collider:getWorldPoint",
|
|
"Collider:getWorldPoint",
|
|
"Collider:getAABB",
|
|
"Collider:getAABB",
|