Errors with newPolygonShape
Posted: Thu May 03, 2012 10:20 am
Hey there,
I'm having a hard time with the newPolygonShape function.
It keeps throwing me an error like "area > b2_epsilon", and don't quite know why.
I am trying to make an "L"-Shape.
This line here works without any problems (but lacks the last edge I need for the "L")
But if I add the missing point like so:
it will throw the error described above.
Any suggestions? Until now I made two single RectangleShapes and uses two fixtures to attach them to the body, but actually I don't think this is the best solution to this. So I wanted to rebuild my Shapes with the PolygonShape.
Would be great if any of you guys has an approach to this problem.
Thanks in advance
Edit:
Okay, I even tried to pass the vertices clockwise like:
Now it does not throw any errors (for now), but this is not the shape I was looking for, it looks more like a chimney than an "L". I doublechecked my vertices, but I can not see any mistakes.
Any help?
I'm having a hard time with the newPolygonShape function.
It keeps throwing me an error like "area > b2_epsilon", and don't quite know why.
I am trying to make an "L"-Shape.
This line here works without any problems (but lacks the last edge I need for the "L")
Code: Select all
love.physics.newPolygonShape(0,0,0,48,32,48,32,32,16,32)
Code: Select all
love.physics.newPolygonShape(0,0,0,48,32,48,32,32,16,32,16,0)
Any suggestions? Until now I made two single RectangleShapes and uses two fixtures to attach them to the body, but actually I don't think this is the best solution to this. So I wanted to rebuild my Shapes with the PolygonShape.
Would be great if any of you guys has an approach to this problem.
Thanks in advance
Edit:
Okay, I even tried to pass the vertices clockwise like:
Code: Select all
love.physics.newPolygonShape(0,0,16,0,16,32,32,32,32,48,0,48)
Any help?