Hi,
Can you tell me if I'm doing something wrong or if it's a bug in the spine-love runtime? The bounding box vertices seem to have inverted y coordinates.


package.path = package.path .. ";../spine-runtimes/spine-love/?.lua;../spine-runtimes/?.lua"
Spine = require('spine-love.spine')
function love.load()
local json = Spine.SkeletonJson.new()
local skeletonData = json:readSkeletonDataFile("skeleton.json")
skeleton = Spine.Skeleton.new(skeletonData)
skeleton.x = 400
skeleton.y = 300
skeleton:updateWorldTransform()
bounds = Spine.SkeletonBounds.new()
bounds:update(skeleton, false)
end
function love.update(dt)
skeleton:update(dt)
x, y = love.mouse.getPosition()
end
function love.draw()
love.graphics.setColor(255, 255, 255)
love.graphics.print(string.format('(%f, %f)', x, y), 20, 20)
love.graphics.setColor(0, 255, 0)
local p1 = bounds:getPolygon(skeleton:getAttachment('p1', 'p1'))
print('p1', unpack(p1))
love.graphics.polygon('line', p1)
local p2 = bounds:getPolygon(skeleton:getAttachment('p2', 'p2'))
print('p2', unpack(p2))
love.graphics.polygon('line', p2)
love.graphics.setColor(255, 0, 0)
love.graphics.point(400, 300)
end
I've attached a zip of the spine project and love code. I'm running spine-runtimes from master (059cc6), love 0.9.1 on OS X 10.9.4.
EDIT:
I created a hacky workaround, but there must be a better way:
https://github.com/clofresh/spine-runti ... inverted-y