Page 2 of 2

Re: body:getposition with multiple shapes

Posted: Sun Oct 13, 2019 10:44 pm
by pgimeno
zell2002 wrote: Sun Oct 13, 2019 10:18 pm So this is a barebones demo - a world with a static box, then if you press spacebar it will create a "player" this player will be a rectangle with 2 extra shapes added to the same body. One shape is another rectangle and its offset is taken into account, the other is a circle and it doesnt matter what offsets you give it, they are not used at all. Even changing the ordering of when the shapes are made do not change where the circle is built. It is always built at 0,0 of the body.
That's a bug in PhysRenderer.lua, not in love.physics. I tried replacing it with Azhukar's debugWorldDraw and the circle changed position the expected way.

In fact, the part of PhysRenderer that draws the circle always draws it at relative coordinates 0, 0. It doesn't use CircleShape:getPoint at all.

Re: body:getposition with multiple shapes

Posted: Mon Oct 14, 2019 6:20 pm
by zell2002
oh no.......... youre kidding me........... i feel awful for wasting peoples time
let me double check this

Re: body:getposition with multiple shapes

Posted: Mon Oct 14, 2019 6:26 pm
by zell2002
Im very very sorry, that all this time I had missed a rendering bug... I am so ashamed lol
Thank you both for looking into this !
Is it possible to delete a post........?

Re: body:getposition with multiple shapes

Posted: Mon Oct 14, 2019 6:53 pm
by zorg
zell2002 wrote: Mon Oct 14, 2019 6:26 pm Im very very sorry, that all this time I had missed a rendering bug... I am so ashamed lol
Thank you both for looking into this !
Is it possible to delete a post........?
You don't need to; how else would others learn from mistakes?