PDA

View Full Version : Mystery bug, related to physics and engine reset.



speeder
04-01-2010, 03:28 AM
I made my ball have a extremely low density...

And my bricks I left on the default density (that is high).

The ball bounce on them perfectly, not moving them (unless the ball reach a extreme high speed, then it may nudge them 1 pixel... but this happened only once so far, and after I manually set the ball speed to something absurd...)

But if I reset the engine (control+shift+r), the objects act like if they had the same density, and when the ball hit a brick, the entire wall of bricks move around and spread, like a snooker ball hitting the starting triangle of balls...

But if I close it, and open again, it runs fine again...

Seth
04-03-2010, 02:11 PM
Hmm, can you post a novashell world example project showing this bug?

speeder
04-03-2010, 05:13 PM
I figured that the bug is not exactly that. I saw it happen after initial fire-ups too, and managed to prevent it after resets...

I discovered that it is triggered when I do that exact sequence of steps:

Fire-up or reset.
Press F1.
Open my level.
Select the ball, and set its initial speed.
Press F1 again.

The ball collide and all the blocks go flying.

If I do that sequence of steps instead, the bug does not happen:
Fire-up or reset.
Press F1.
Open my level.
Press F1.
Press F1.
Select the ball, and set its initial speed.
Press F1 and see the game working fine.


So, I reached the conclusion, that the "density" of objects, is set only when the simulation is running, and for some reason, if I modify a object (it is not the blocks that are heavier, is the ball that I set to be lighter), the density setting does not happen anymore.


Finally: You can repeat the steps with my project, to move the ball, click on it, open the console and type in "JumpStart()" this will set the ball to move upward. Also, usually when the bug happen, the ball refuse to move, so you have to do "JumpStart()" on it again.