I'm getting a strange physics error when I create a rectangle with a height of 0. This is the code:
Code: Select all
function Entity:setRectangleShape(x, y, angle)
self.shape = love.physics.newRectangleShape(self.body, x or 0, y or 0, self.width, self.height, angle or 0)
end
I call the function with no parameters passed in, and the entity's width set to a certain value greater than 0 and the height to 0. This causes love.app to display a window with nothing but gray, freeze for a bit and then quit. This message is displayed in the terminal:
Code: Select all
2011-01-09 15:37:02.110 love[3047:903] Can't open input server /Library/InputManagers/Inquisitor
Assertion failed: (edge.LengthSquared() > 1.19209290e-7F * 1.19209290e-7F), function b2PolygonShape, file /Users/bill/love/platform/macosx/../../src/modules/physics/box2d/Source/Collision/Shapes/b2PolygonShape.cpp, line 161.
Abort trap
Please note, the "Can't open input server" appears all the time, so it's nothing to worry about I assume. Anyway, it me a while to work out I was making a rectangle with a height of 0, and when I changed the height the problem was fixed.