I tried both values as you suggested but there was no differencethelinx wrote:Is it set to allow sleeping?
Search found 6 matches
- Thu Jun 02, 2011 11:51 am
- Forum: Support and Development
- Topic: Help with setRestitution -- weird bugs?
- Replies: 13
- Views: 5067
Re: Help with setRestitution -- weird bugs?
- Thu Jun 02, 2011 10:30 am
- Forum: Support and Development
- Topic: Help with setRestitution -- weird bugs?
- Replies: 13
- Views: 5067
Re: Help with setRestitution -- weird bugs?
I believe the default is 0. I tested, the default is 0.1. I also tried your code, and after limiting dt, I found no problem. It didn't bounce when I set restitution to 0 and it didn't fly off the world for 0.9. You're right, the default is 0.1. About 0.9, I didn't say it flies off the world, it jus...
- Thu Jun 02, 2011 9:04 am
- Forum: Support and Development
- Topic: Help with setRestitution -- weird bugs?
- Replies: 13
- Views: 5067
Re: Help with setRestitution -- weird bugs?
If I set it to 0 the same thing happens. I believe the default is 0.Robin wrote:#1 is because the default restitution is not zero, it seems to be 0.1. So when you set it to 0.9, it bounces back nine times as strong as normally.
- Thu Jun 02, 2011 7:26 am
- Forum: Support and Development
- Topic: Help with setRestitution -- weird bugs?
- Replies: 13
- Views: 5067
Re: Help with setRestitution -- weird bugs?
I cannot reproduce bug 2 and 3. As for those bugs, try to cap dt in love.update, like so: function love.update(dt) dt = math.min(dt, 1 / 30) ... end dt can become very big in the first frame, which will in turn update the physics system with a way to big timestep. Thanks! That did fix #2 and #3 Any...
- Wed Jun 01, 2011 10:26 pm
- Forum: Support and Development
- Topic: Help with setRestitution -- weird bugs?
- Replies: 13
- Views: 5067
Re: Help with setRestitution -- weird bugs?
I didn't change anything in the tutorial, this is the exact code I'm using function love.load() world = love.physics.newWorld(-650, -650, 650, 650) --create a world for the bodies to exist in with width and height of 650 world:setGravity(0, 700) --the x component of the gravity will be 0, and the y ...
- Wed Jun 01, 2011 6:12 pm
- Forum: Support and Development
- Topic: Help with setRestitution -- weird bugs?
- Replies: 13
- Views: 5067
Help with setRestitution -- weird bugs?
So, I just followed the physics tutorial: http://love2d.org/wiki/Tutorial:Physics I have three questions 1. Why does the ball bounce when it touches the ground if the default restitution is 0? 2. The code says --let's create a ball bodies[1] = love.physics.newBody(world, 650/2, 650/2, 15, 0) --place...