Module box2d

Box2D plugin for STI

Info:

  • Copyright: 2019
  • License: MIT/X11
  • Author: Landon Manning

Functions

box2d_draw (tx, ty, sx, sy) Draw Box2D physics world.
box2d_init (world) Initialize Box2D physics world.
box2d_removeLayer (index) Remove Box2D fixtures and shapes from world.

Tables

Properties Custom Properties in Tiled are used to tell this plugin what to do.


Functions

box2d_draw (tx, ty, sx, sy)
Draw Box2D physics world.

Parameters:

  • tx Translate on X
  • ty Translate on Y
  • sx Scale on X
  • sy Scale on Y
box2d_init (world)
Initialize Box2D physics world.

Parameters:

  • world The Box2D world to add objects to.
box2d_removeLayer (index)
Remove Box2D fixtures and shapes from world.

Parameters:

  • index The index or name of the layer being removed

Tables

Properties
Custom Properties in Tiled are used to tell this plugin what to do.

Fields:

  • collidable set to true, can be used on any Layer, Tile, or Object
  • sensor set to true, can be used on any Tile or Object that is also collidable
  • dynamic set to true, can be used on any Tile or Object
  • friction can be used to define the friction of any Object
  • restitution can be used to define the restitution of any Object
  • categories can be used to set the filter Category of any Object
  • mask can be used to set the filter Mask of any Object
  • group can be used to set the filter Group of any Object
generated by LDoc 1.4.6 Last updated 2020-04-16 17:17:47