Corners from body?
Posted: Fri Dec 17, 2010 2:25 am
Making a shape with :getBoundingBox() is ok, but if it rotates, the bounding box does not. Is there any way to get the corners of a shape?
Kind of vague but your shape should have an X/Y value right? The starting X/Y of a shape is in the top left corner of the shape. So X/Y would be your top left corner.Socks wrote:Making a shape with :getBoundingBox() is ok, but if it rotates, the bounding box does not. Is there any way to get the corners of a shape?
Code: Select all
function love.load()
box = {}
box.x = 50
box.y = 50
box.w = 100
box.h = 100
end
function love.draw()
love.graphics.rectangle("fill", box.x, box.y, box.w, box.h)
end