Skip to content

mv.collision.rect

Create a reusable rectangle collider.

Parameters

  • width — A positive width.
  • height — A positive height.
  • options? — A table with offset_x and offset_y.
local body = mv.collision.rect(40, 20, {offset_x = 20, offset_y = 10})

Related: mv.collision.circle, mv.collision.overlap.

See the collision guide for more examples and limits.