Hello,
I am newby towards box2d... I just tried the manual tutorial with the gravity set to -10.0.
I am not completely happy with the tutorial... mostly I am unhappy with the way the force value is supplied.
The problem seems to be when I change the timestep the force values react differently.
I would like to be able to change the timestep in case I need to do so in the future for performance reasons.
And it would be nice if the forces keep reacting somewhat similiarly.
I read a post about how force is applied over time... so it seems to make sense to calculate force value's as follows:
TimeIndepedentForceValue = ForceValue * Timestep;
A timestep is x-th of a second... for example 1/60. (60 being the frequency).
So to me it seems to make sense to supply force values in "force per second"... and then simply adjust it to:
ForceValue/Frequency or simply:
ForceValue * Timestep;
Would that make sense ?!?
Furthermore I am not completely happy with the tutorial... especially when it comes to the settings and the gravity...
The little box doesn't seem to fall realistically... I am not sure if it's because of wrong tutorial settings or if it's because it's in meters pretending to be a high building ?!?
It would be nice if a tutorial could show a bouncing ball realistically... just to add confidence towards box2d having somewhat realistic physics.
Also it doesn't seem to explain how to draw manually instead of debugdraw... but I figured it out... it's using the transform matrix... xf to multiply with the vertices... so I managed to figure that out... (I am using Delphi version by the way 😉 which has the GetTransform method for Bodie's.)
Anyway please let me know if I am (somewhat) correct about how to specify "force indepedent values of timestep" and how to calculate timestep depedent values...
I shall continue experimenting with box2d.
I haven't tried the zoom/scale tip yet... maybe I have to do that manually or maybe opengl has a zoom functionality.
So far I used ortho2D to set viewport to -width/2, +width/2, height/2, -height/2.
I am not sure if this is pixel accurate anymore... it used to be pixel accurate with 0, width, height, 0.
Something I might need to look into.
Also I am not sure if I am actually going to use pixel-accurate graphics or something totally different...
but for now pixel-accurate seems nice for accuracy 😉 🙂
Bye,
Skybuck.
I am newby towards box2d... I just tried the manual tutorial with the gravity set to -10.0.
I am not completely happy with the tutorial... mostly I am unhappy with the way the force value is supplied.
The problem seems to be when I change the timestep the force values react differently.
I would like to be able to change the timestep in case I need to do so in the future for performance reasons.
And it would be nice if the forces keep reacting somewhat similiarly.
I read a post about how force is applied over time... so it seems to make sense to calculate force value's as follows:
TimeIndepedentForceValue = ForceValue * Timestep;
A timestep is x-th of a second... for example 1/60. (60 being the frequency).
So to me it seems to make sense to supply force values in "force per second"... and then simply adjust it to:
ForceValue/Frequency or simply:
ForceValue * Timestep;
Would that make sense ?!?
Furthermore I am not completely happy with the tutorial... especially when it comes to the settings and the gravity...
The little box doesn't seem to fall realistically... I am not sure if it's because of wrong tutorial settings or if it's because it's in meters pretending to be a high building ?!?
It would be nice if a tutorial could show a bouncing ball realistically... just to add confidence towards box2d having somewhat realistic physics.
Also it doesn't seem to explain how to draw manually instead of debugdraw... but I figured it out... it's using the transform matrix... xf to multiply with the vertices... so I managed to figure that out... (I am using Delphi version by the way 😉 which has the GetTransform method for Bodie's.)
Anyway please let me know if I am (somewhat) correct about how to specify "force indepedent values of timestep" and how to calculate timestep depedent values...
I shall continue experimenting with box2d.
I haven't tried the zoom/scale tip yet... maybe I have to do that manually or maybe opengl has a zoom functionality.
So far I used ortho2D to set viewport to -width/2, +width/2, height/2, -height/2.
I am not sure if this is pixel accurate anymore... it used to be pixel accurate with 0, width, height, 0.
Something I might need to look into.
Also I am not sure if I am actually going to use pixel-accurate graphics or something totally different...
but for now pixel-accurate seems nice for accuracy 😉 🙂
Bye,
Skybuck.