1. Anders Ruud
  2. love
  3. Issues

Issues

Issue #617 invalid

newRectangleShape not using correct points?

Minh Ngo
created an issue

Uncomment the rectangle constructor and see that it doesn't draw the square at the same location as the polygon constructor.

I believe it may be related to this gentleman's problem: https://love2d.org/forums/viewtopic.php?f=4&t=33652

world = love.physics.newWorld(0,100)

shape = love.physics.newPolygonShape(0, 0, 10, 0, 10, 10, 0, 10)

-- shape = love.physics.newRectangleShape(10, 10)

body = love.physics.newBody(world, 0, 0, "dynamic")

fixture = love.physics.newFixture(body, shape)

love.physics.setMeter(100)      

function love.update(dt) world:update(dt) end

function love.draw() love.graphics.polygon('fill',body:getWorldPoints(shape:getPoints())) end

Comments (4)

  1. Log in to comment