--Search for a shape tagged "mybox" in script scope
local target = FindShape("mybox")
--Search for a shape tagged "laserturret" in entire scene
local escape = FindBody("laserturret", true)
Actual Result:
Note that in the second line of code it says FindBody.
Expected Result:
I think it should be FindShape instead.
--Shape transform in body local space
local shapeTransform = GetShapeLocalTransform(shape)
--Body transform in world space
local bodyTransforn = GetBodyTransform(GetShapeBody(shape))
--Shape transform in world space
local worldTranform = TransformToParentTransform(bodyTransform, shapeTransform)
Actual Result:
Note the variable name bodyTransforn.
Expected Result:
Should actually be bodyTransform instead with an "m" at the end.
local worldTransform = GetShapeWorldTransform(shape)
--This is equivalent to
local shapeTransform = GetShapeLocalTransform(shape)
local bodyTransforn = GetBodyTransform(GetShapeBody(shape))
worldTranform = TransformToParentTransform(bodyTransform, shapeTransform)
Actual Result:
Note the variable name bodyTransforn.
Expected Result:
Should actually be bodyTransform instead with an "m" at the end.
In the Lua API documentation for Teardown 0.6.2 there are some minor issues
For "SetString"
The example API shows
SetBool("level.name", "foo")
Actual Result: Note that it says
SetBool
.Expected Result: I think it should be
SetString
instead.Link: https://www.teardowngame.com/modding/api.html#SetString
For "FindJoint" and "FindJoints"
Both examples API use
FindLocation
instead ofFindJoint
andFindJoints
Links: https://www.teardowngame.com/modding/api.html#FindJoint https://www.teardowngame.com/modding/api.html#FindJoints
For "FindShape"
The example API shows
Actual Result: Note that in the second line of code it says
FindBody
.Expected Result: I think it should be
FindShape
instead.https://www.teardowngame.com/modding/api.html#FindShape
For "GetShapeLocalTransform"
The example API shows
Actual Result: Note the variable name
bodyTransforn
.Expected Result: Should actually be
bodyTransform
instead with an "m" at the end.https://www.teardowngame.com/modding/api.html#GetShapeLocalTransform
For "GetShapeWorldTransform"
The example API shows
Actual Result: Note the variable name
bodyTransforn
.Expected Result: Should actually be
bodyTransform
instead with an "m" at the end.https://www.teardowngame.com/modding/api.html#GetShapeWorldTransform