Corners from body?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Corners from body?
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?
:p
Re: Corners from body?
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?
For example.
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
I'm not sure if this is really what you were asking about, but I hope it helps. Maybe you can post some code, and ask a more specific question?
@rynesaur
Who is online
Users browsing this forum: Google [Bot] and 7 guests