body:getposition with multiple shapes

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
pgimeno
Party member
Posts: 1896
Joined: Sun Oct 18, 2015 2:58 pm
Location: Valencia, ES

Re: body:getposition with multiple shapes

Post by pgimeno » Sun Oct 13, 2019 10:44 pm

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.

zell2002
Citizen
Posts: 75
Joined: Sun Feb 23, 2014 9:22 pm

Re: body:getposition with multiple shapes

Post by zell2002 » Mon Oct 14, 2019 6:20 pm

oh no.......... youre kidding me........... i feel awful for wasting peoples time
let me double check this

zell2002
Citizen
Posts: 75
Joined: Sun Feb 23, 2014 9:22 pm

Re: body:getposition with multiple shapes

Post by zell2002 » 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........?

User avatar
zorg
Party member
Posts: 2722
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: body:getposition with multiple shapes

Post by zorg » Mon Oct 14, 2019 6:53 pm

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?
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.

Post Reply

Who is online

Users browsing this forum: Bing [Bot], joedono, YounYokel and 17 guests