this is what happens
--this works fine
rect = HC.rectangle(100, 100, 64, 64)
--but if want to create a rectangle using a table for e.g.
player = {}
player.x = 100
player.y = 100
player.size = 64
player.rect = HC.rectangle(player.x, player.y, player.size, player.size)
-- gives me this error v v v
--[[
Error
HC-master/polygon.lua:145: Need at least 3 non collinear points to build polygon (got 0)
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'assert'
HC-master/polygon.lua:145: in function 'construct'
HC-master/class.lua:77: in function 'instance'
HC-master/shapes.lua:439: in function 'newPolygonShape'
HC-master/init.lua:86: in function 'rectangle'
main.lua:59: in main chunk
[C]: in function 'require'
[C]: in function 'xpcall'
[C]: in function 'xpcall'
]]
happens when using values from a table in the arguments
this is what happens
happens when using values from a table in the arguments