Lua functions list
(Difference between revisions)
Line 76: | Line 76: | ||
* [[isCollisionBetween]](object1, object2) | * [[isCollisionBetween]](object1, object2) | ||
* [[getNumCollisions]](object) | * [[getNumCollisions]](object) | ||
− | * [[rayHit]](start, end | + | * [[rayHit]](start, end)<br><br> |
===Inputs=== | ===Inputs=== | ||
Revision as of 15:24, 5 February 2013
Contents |
3d Math
Object
- getObject(« objectName »)
- getParent(object)
- getChilds(object)
- getClone(object)
- setParent(object, parent)
- getName(object)
- activate(object)
- deactivate(object)
- isVisible(object)
- isActive(object)
- rotate(object, {x, y, z}, angle, "local")
- translate(object, {x, y, z}, "local")
- getPosition(object)
- getRotation(object)
- getScale(object)
- setPosition(object, {x, y, z})
- setRotation(object, {x, y, z})
- setScale(object, {x, y, z})
- getTransformedPosition(object)
- getTransformedRotation(object)
- getTransformedScale(object)
- getInverseRotatedVector(object)
- getRotatedVector(object)
- getInverseVector(object)
- getTransformedVector(object)
- updateMatrix(object)
- getMatrix(object)
- enableShadow(object, shadow)
- isCastingShadow(object)
Behavior
- getBehaviorVariable(object, behaviorId, "variableName")
- setBehaviorVariable(object, behaviorId, "variableName", value)
Animation
- getCurrentAnimation(object)
- changeAnimation(object, animationId)
- isAnimationOver(object)
- getAnimationSpeed(object)
- setAnimationSpeed(object, speed)
- getCurrentFrame(object)
- setCurrentFrame(object, frame)
Physics
- setGravity({x, y, z})
- getGravity()
- getLinearDamping(object)
- setLinearDamping(object, damping)
- getAngularDamping(object)
- setAngularDamping(object, damping)
- getLinearFactor(object)
- setLinearFactor(object, {x, y, z})
- getAngularFactor(object)
- setAngularFactor(object, factor)
- getMass(object)
- setMass(object, mass)
- getFriction(object)
- setFriction(object, friction)
- getRestitution(object)
- setRestitution(object, restitution)
- clearForces(object)
- addCentralForce(object, {x, y, z}, "local")
- addTorque(object, {x, y, z}, "local")
- getCentralForce(object)
- getTorque(object)
- isCollisionTest(object)
- isCollisionBetween(object1, object2)
- getNumCollisions(object)
- rayHit(start, end)
Inputs
- isKeyPressed(key)
- onKeyDown(key)
- onKeyUp(key)
- getAxis(axis)
- getProperty("propertyName")
- getTouchPosition(touchId)
- getLastTouchPosition(touchId)
- getTouchPhase(touchId)
Sound
- playSound(object)
- pauseSound(object)
- stopSound(object)
- getSoundGain(object)
- setSoundGain(object, gain)
Scene
- getScene("sceneName")
- changeScene(scene)
- getCurrentSceneId()
- getScenesNumber()
Level
- loadLevel("levelName")
Light
- getLightColor(object)
- getLightRadius(object)
- getLightIntensity(object)
- getLightShadowQuality(object)
- getLightShadowBias(object)
- getLightShadowBlur(object)
- getLightSpotAngle(object)
- getLightSpotExponent(object)
- setLightColor(object, {r, g, b})
- setLightRadius(object, radius)
- setLightIntensity(object, intensity)
- setLightShadowQuality(object, quality)
- setLightShadowBias(object, bias)
- setLightShadowBlur(object, blur)
- setLightSpotAngle(object, spotAngle)
- setLightSpotExponent(object, exponent)
Camera
- changeCurrentCamera(object)
- getCurrentCamera()
- getCameraClearColor(object)
- getCameraFov(object)
- getCameraNear(object)
- getCameraFar(object)
- getCameraFogDistance(object)
- isCameraOrtho(object)
- isCameraFogEnabled(object)
- setCameraClearColor(object, {r, g, b})
- setCameraFov(object, fov)
- setCameraNear(object, near)
- setCameraFar(object, far)
- setCameraFogDistance(object, fogDistance)
- enableCameraOrtho(object, ortho)
- enableCameraFog(object, fog)
- enableCameraLayer(object, scene)
- disableCameraLayer(object)
- enableRenderToTexture(object, "textureName", renderWith, renderHeight)
- disableRenderToTexture(object)
- getProjectedPoint(object, point)
- getUnProjectedPoint(object, point)
Text
- setText(object , "text")
- getText(object)
- getTextColor(object)
- setTextColor(object, {r, g, b, a})
System
- centerCursor()
- hideCursor()
- showCursor()
- getWindowScale()
- getSystemTick()
- quit()
- dofile("filename.lua")