I've been working real hard on my first simulator using love2d and now I got on my first badass problem.
This week, I decided to use a OO library to make my code easier to mantain and, as a option suggested in the love wiki, 30log was the way to go. After some coding here and there, after turning some good amount of code into classes for this library, Class-Common showed up in my browser. Seemed like a good idea so, I started using as well.
What happened then was pretty weird: my polygon that was just fine some time ago stopped working as it was. Right now it moves, as it was doing already, but no longer rotates. After some background lookup, I opened a ticket reporting the issue but, I do not want to refactor my code again. I want to keep using class-common, so (finally! ), my question is: is there a OO library with common support that works alright with Hardon Collider?
This is the code for anyone willing to reproduce the "non rotation" problem.
Code: Select all
--uncomment to see rotation stop
--require '30logclasscommons'
shapes = require "hardoncollider.shapes"
pot = shapes.newPolygonShape(
0, 10,
10, 0,
48, 0,
58, 10,
58, 30,
48, 40,
10, 40,
0, 30
)
local instance = pot
function love.load()
instance:moveTo(100, 100)
end
function love.update(dt)
instance:rotate(math.pi/4)
instance:move(1, 0)
end
function love.draw()
instance:draw()
end