PhysicsCreateStaticCollision

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Creates static collision

Syntax

physics-static-collision physicsCreateStaticCollision(physics-shape theShape)

Required Arguments

  • theShape : the shape of static collision. Accept all types of shapes.

Returns

Example

Spawns box as ground at center of map

local boxShape = physicsCreateShape(physics, "box",200,200,1)
local box = physicsCreateStaticCollision(boxShape)
physicsSetProperties(box, "position", 0,0,1.8)

See Also