Hi all! I've been using Love's physics engine for my game, however I've noticed that fixtures seem to be slightly bigger than they should be, causing there to be small gaps between them, and I'm not sure what's causing it. I know this can be fixed by just reducing the fixtures' size relative to the textures to compensate, though I don't want to do this if I don't have to. Anyone know what's happening?
The circle and the red lines show where the fixtures should be.
Physics objects not quite touching
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Physics objects not quite touching
What type of collision are you using? Do you scale the textures? The problem does not come from the scale of the world? If you can try to reproduce the same problem as in your game in a small script and share it, we can better guide you because the causes can be multiple. Maybe someone else who has had the same problem as you can tell more.
Re: Physics objects not quite touching
My bet would be on inappropriate setting of love.physics.setMeter().
https://love2d.org/wiki/love.physics.setMeterIt is recommended to create shapes no larger than 10 times the scale. This is important because Box2D is tuned to work well with shape sizes from 0.1 to 10 meters. The default meter scale is 30.
Re: Physics objects not quite touching
Ah it does seem to be affected by changing it - I'm not sure if I'm going to bother to try fix it, it'll be too much of a pain to try and fix the other elements to fit it. Does anyone know if there's a way to change it without affecting all of the force and speed values?pgimeno wrote: ↑Tue Jan 24, 2023 3:14 pm My bet would be on inappropriate setting of love.physics.setMeter().
https://love2d.org/wiki/love.physics.setMeterIt is recommended to create shapes no larger than 10 times the scale. This is important because Box2D is tuned to work well with shape sizes from 0.1 to 10 meters. The default meter scale is 30.
Dragon
Re: Physics objects not quite touching
Unfortunately if you change the "scale" of the world I think that you will have to review these values.Bobble68 wrote: ↑Thu Jan 26, 2023 11:53 am Ah it does seem to be affected by changing it - I'm not sure if I'm going to bother to try fix it, it'll be too much of a pain to try and fix the other elements to fit it. Does anyone know if there's a way to change it without affecting all of the force and speed values?
Who is online
Users browsing this forum: Google [Bot] and 3 guests