I have an environment setup where I expect 0 restitution. However things still seem to bounce.
A classic is example is where I have a static box on the left, with several other dynamic boxes lined up to the right, slightly apart. I take yet another dynamic box to the right of all those boxes, and apply a force on it to the left. When this box hits the first box and pushes everything up against the static box on the left, there's some restitution and the boxes come apart instead of touching edge to edge. I tried some slightly negative restitution values which help the problem a little, but don't solve it, especially if the force applied to the box is high.
Is there a fix for this?
(The force applied is calculated based on the mouse position... e.g. the mouse is hovering way to the left, and I calculate the force required for the box to get to the mouse position in some given timeframe, say 0.1 seconds, using d=at^2+v0t and F=ma, recalculating the force on each step/tick. However, this problem also appears using an instantaneous one-time force applied on a click as well.)
From what little I've looked through the code, I'm guessing this is not a restitution problem, but a iteration problem or point of impact etc. issue. The simulation is 60 cps. The velocity and point iterations are at 10 each. Moving them up to the 25 also helps the problem tremendously, but that seems high. Any suggestions would be appreciated.
A classic is example is where I have a static box on the left, with several other dynamic boxes lined up to the right, slightly apart. I take yet another dynamic box to the right of all those boxes, and apply a force on it to the left. When this box hits the first box and pushes everything up against the static box on the left, there's some restitution and the boxes come apart instead of touching edge to edge. I tried some slightly negative restitution values which help the problem a little, but don't solve it, especially if the force applied to the box is high.
Is there a fix for this?
(The force applied is calculated based on the mouse position... e.g. the mouse is hovering way to the left, and I calculate the force required for the box to get to the mouse position in some given timeframe, say 0.1 seconds, using d=at^2+v0t and F=ma, recalculating the force on each step/tick. However, this problem also appears using an instantaneous one-time force applied on a click as well.)
From what little I've looked through the code, I'm guessing this is not a restitution problem, but a iteration problem or point of impact etc. issue. The simulation is 60 cps. The velocity and point iterations are at 10 each. Moving them up to the 25 also helps the problem tremendously, but that seems high. Any suggestions would be appreciated.