I tried to use classes from the tutorials on this site, but objects are falling very slowly, I played with the mass property of collision body, but it doesn't seem to take any effect, is there any way to increase gravity or really increase the mass of an object.
Date: 08 Nov 2009 22:13
Number of posts: 4
RSS: New posts
Hmm, are you running this on PC or Xbox? It's possible that your CPU is just maxing out and the JigLibX is updating too slow. If not then I'd say JigLibX is functioning correctly.
However, in regards to trying to increasing the mass of an object in order to increase the rate at which it falls fundamentally will not work. The SI unit for gravity is m/s^2, in other words gravity itself is an acceleration constant. In a vacuum all objects will accelerate at the same rate regardless of mass, the force however will be larger for objects of greater mass.
force = mass * acceleration
i.e. weight = mass * gravity
To increase gravity for all objects you can assign your own Vector3 to PhysicsSystem.Gravity.
thank you for small and interesting lection in physics, but I had a pleasure to study this discipline in school.
I run jiglib on pc, but i sure that the problem isn't in slow perfomance of my hardware, just because the jigglegame runs perfectly. I have no idea why the objects behave that way in my game. And, yes, PhysicsSystem.Gravity is exactly what I was looking for, -100 for Y-axis is ideal in my case.
Thank you for your kind instructions, Mr. Benjamin Dobell.
what does your timestep look like? could you post the code where you're calling Integrate on the PhysicsSystem? If simulation overall is slow ( not just gravity ) you might want to take a look at that.
this is a good example of a timestep approach http://jiglibx.wikidot.com/forum/t-60817/bouncing-bodies-and-performance