Please correct me if I'm wrong about anything here. I'm new to Love! From what I understand, the underlying physics engine is Box2d, which uses an x, y location coordinate in the center of the object. Does Love provide any automatic translation of coordinates when drawing its own objects (like images)? For example, if I have an image that is a circle, I obviously want to draw it in the same location as the physics body. Since the image is drawn from the top left, do I need to adjust for that like so:
Graphics and physics are completely decoupled, so indeed, it does not take the origin into account. That said, it's trivial to define your shapes as if they have a top-left origin.
I'd strongly suggest you use the offset parameters to love.graphics.draw when you do things like this, since that handles things like rotation and scaling properly.
I'd strongly suggest you use the offset parameters to love.graphics.draw when you do things like this, since that handles things like rotation and scaling properly.
Oh nice, I did not know this. That makes sense!
I have my circle image colliding and rotating properly so far. Thanks for the help!