love.physics.newPolygonShape( body, ... )
Synopsis
polygon = love.physics.newPolygonShape( body, ... )
Arguments
body The Body to attatch the polygon to.
... The vertices of the PolygonShape.
Returns
PolygonShape The new PolygonShape.
I assumed the vertices are pairs of numbers as shown in the Box2D manual so I did this...
Code: Select all
function load()
-- Code Here
TriImage1 = love.graphics.newImage("BlueTri01.png")
world = love.physics.newWorld(2000,2000)
TriBody1 = love.physics.newBody(world,1000,1000)
TriShape1 = love.physics.newPolygonShape(TriBody1, {-1,0}, {1,0}, {0,2})
end
Does that mean my polygons must have 6 vertices, or am I missing something here?main.lua:6 Incorrect number of arguments. Got[4], expected at least [7]
Stack traceback:
[C]: in function 'newPolygonShape'
main.lua:6 in function <main.lua:1>