You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Physics Library

19.0

Physics Library

This is an interface library to Chipmunk Physics version 5.3.4. For details about this library see http://chipmunk-physics.net/release/Chipmunk-5.x/Chipmunk-5.3.4-Docs/.

To use this library the physics module must be loaded: “require ('physics')”.

This library is introduced in platform.apiLevel = ‘2.0’.

Related Topics

Miscellaneous routines

INFINITY

momentForBox

momentForCircle

momentForPoly

momentForSegment

Vectors

Vect

add

clamp

cross

dist

distsq

dot

eql

length

lengthsq

lerp

lerpconst

mult

near

neg

normalize

normalizeSafe

perp

project

rotate

rperp

setx

sety

slerp

slerpconst

sub

toangle

unrotate

x

y

BoundingBoxes

BB

b

clampVect

containsBB

containsVect

expand

intersects

l

merge

setb

r

setl

setr

sett

t

wrapVect

Bodies

Body

activate

angle

angVel

applyForce

applyImpulse

data

force

isRogue

isSleeping

local2World

kineticEnergy

mass

moment

pos

resetForces

rot

setAngle

setAngVel

setData

setForce

setMass

setMoment

setPos

setPositionFunc

setTorque

setVel

setVelocityFunc

setVLimit

setWLimit

sleep

sleepWithGroup

torque

updatePosition

updateVelocity

vel

vLimit

wLimit

world2Local

Shapes

BB

body

collisionType

data

friction

group

layers

rawBB

restitution

sensor

setCollisionType

setData

setFriction

setGroup

setLayers

setRestitution

setSensor

setSurfaceV

surfaceV

Circle Shapes

CircleShape

offset

radius

Polygon Shapes

PolyShape

numVerts

points

vert

Segment Shapes

SegmentShape

a

b

normal

radius

Spaces

Space

addBody

addConstraint

addCollisionHandler

addPostStepCallback

addShape

addStaticShape

damping

data

elasticIterations

gravity

idleSpeedThreshold

iterations

rehashShape

rehashStatic

removeBody

removeConstraint

removeShape

removeStaticShape

resizeActiveHash

resizeStaticHash

setDamping

setData

setElasticIterations

setGravity

setIdleSpeedThreshold

setIterations

setSleepTimeThreshold

sleepTimeThreshold

step

Constraints

Damped Rotary Spring

Damped Spring

Gear Joint

Groove Joint

Pin Joint

Pivot Joint

Ratchet Joint

Rotary Limit Joint

Simple Motor

Slide Joints

Arbiters and Collision Pairs

#

a

b

bodies

depth

elasticity

friction

impulse

isFirstContact

normal

point

setElasticity

setFriction

shapes

totalImpulse

totalImpulseWithFriction

Shape Queries

pointQuery

segmentQuery

Space Queries

pointQuery

pointQueryFirst

segmentQuery

segmentQueryFirst

SegmentQueryInfo

hitDist

hitPoint