|
@@ -4,58 +4,70 @@ return {
|
|
arguments = {
|
|
arguments = {
|
|
x = {
|
|
x = {
|
|
type = 'number',
|
|
type = 'number',
|
|
- description = 'The x component of the force to apply.'
|
|
|
|
|
|
+ description = 'The x component of the world-space force vector, in newtons.'
|
|
},
|
|
},
|
|
y = {
|
|
y = {
|
|
type = 'number',
|
|
type = 'number',
|
|
- description = 'The y component of the force to apply.'
|
|
|
|
|
|
+ description = 'The y component of the world-space force vector, in newtons.'
|
|
},
|
|
},
|
|
z = {
|
|
z = {
|
|
type = 'number',
|
|
type = 'number',
|
|
- description = 'The z component of the force to apply.'
|
|
|
|
|
|
+ description = 'The z component of the world-space force vector, in newtons.'
|
|
},
|
|
},
|
|
px = {
|
|
px = {
|
|
type = 'number',
|
|
type = 'number',
|
|
- description = 'The x position to apply the force at, in world coordinates.'
|
|
|
|
|
|
+ description = 'The x position to apply the force at, in world space.'
|
|
},
|
|
},
|
|
py = {
|
|
py = {
|
|
type = 'number',
|
|
type = 'number',
|
|
- description = 'The y position to apply the force at, in world coordinates.'
|
|
|
|
|
|
+ description = 'The y position to apply the force at, in world space.'
|
|
},
|
|
},
|
|
pz = {
|
|
pz = {
|
|
type = 'number',
|
|
type = 'number',
|
|
- description = 'The z position to apply the force at, in world coordinates.'
|
|
|
|
|
|
+ description = 'The z position to apply the force at, in world space.'
|
|
},
|
|
},
|
|
force = {
|
|
force = {
|
|
type = 'Vec3',
|
|
type = 'Vec3',
|
|
- description = 'The force vector to apply.'
|
|
|
|
|
|
+ description = 'The world-space force vector, in newtons.'
|
|
},
|
|
},
|
|
position = {
|
|
position = {
|
|
type = 'Vec3',
|
|
type = 'Vec3',
|
|
- description = 'The position to apply the force at, in world coordinates.'
|
|
|
|
|
|
+ description = 'The position to apply the force at, in world space.'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
returns = {},
|
|
returns = {},
|
|
variants = {
|
|
variants = {
|
|
{
|
|
{
|
|
|
|
+ description = 'Apply a force at the center of mass.',
|
|
arguments = { 'x', 'y', 'z' },
|
|
arguments = { 'x', 'y', 'z' },
|
|
returns = {}
|
|
returns = {}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ description = 'Apply a force at a custom position.',
|
|
arguments = { 'x', 'y', 'z', 'px', 'py', 'pz' },
|
|
arguments = { 'x', 'y', 'z', 'px', 'py', 'pz' },
|
|
returns = {}
|
|
returns = {}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ description = 'Apply a force at the center of mass, using vector types.',
|
|
arguments = { 'force' },
|
|
arguments = { 'force' },
|
|
returns = {}
|
|
returns = {}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
|
|
+ description = 'Apply a force at a custom position, using vector types.',
|
|
arguments = { 'force', 'position' },
|
|
arguments = { 'force', 'position' },
|
|
returns = {}
|
|
returns = {}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- notes = 'If the Collider is asleep, calling this function will wake it up.',
|
|
|
|
|
|
+ notes = [[
|
|
|
|
+ Kinematic colliders ignore forces.
|
|
|
|
+
|
|
|
|
+ If the Collider is asleep, this will wake it up.
|
|
|
|
+
|
|
|
|
+ Forces are accumulated and processed during `World:update`.
|
|
|
|
+ ]],
|
|
related = {
|
|
related = {
|
|
- 'Collider:applyTorque'
|
|
|
|
|
|
+ 'Collider:applyLinearImpulse',
|
|
|
|
+ 'Collider:applyTorque',
|
|
|
|
+ 'Collider:applyAngularImpulse'
|
|
}
|
|
}
|
|
}
|
|
}
|