IsCollisionTest
From MaratisWiki
(Difference between revisions)
Dahnielson (Talk | contribs) |
Dahnielson (Talk | contribs) m |
||
| (2 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| + | {{lua-function|isCollisionTest|object}} | ||
| + | |||
Detect if an object is colliding with something. | Detect if an object is colliding with something. | ||
| − | Example : Will display Collision! in maratis console window if there's a collision for object1 | + | {{lua-function-param|object|object to operate on}} |
| + | |||
| + | '''Example:''' Will display Collision! in maratis console window if there's a collision for object1. | ||
object1 = getObject("object1") | object1 = getObject("object1") | ||
| Line 9: | Line 13: | ||
[[Category:Lua scripting]] | [[Category:Lua scripting]] | ||
| + | [[Category:Lua function]] | ||
| + | [[Category:Physics]] | ||
Latest revision as of 00:27, 9 February 2014
isCollisionTest(object)
Detect if an object is colliding with something.
-
object: object to operate on
Example: Will display Collision! in maratis console window if there's a collision for object1.
object1 = getObject("object1")
function onSceneUpdate()
if isCollisionTest(object1) then print("Collision!") end
end