PhysicsCreateStaticCollision: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Client function}} Creates static collision ==Syntax== <syntaxhighlight lang="lua"> physics-static-collision physicsCreateStaticCollision(physics-shape theShape)...")
 
(No difference)

Latest revision as of 17:12, 14 February 2020

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