i think this topic is generally important one, since default physics settings works wrong for default world settings. (so it will happen for every new member)
Myself i also use 10units=1meter only just because of physics.
i think this topic is generally important one, since default physics settings works wrong for default world settings. (so it will happen for every new member)
Myself i also use 10units=1meter only just because of physics.
Except for vehicles, the physics simulator expresses all distances in physics-space units. The application programmer decides whether the physics-space units should be meters, feet, cubits, or millionths of a light-year.
And how does the application programmer decide that? How does one actually change the psu?
Iām looking for something like physicsSpace.setPsu(ā¦) but I couldnāt find that
If you set gravity to 9.81 psu per second squared, it will appear that 1 psu = 1 meter.
If you set gravity to 32.2 psu per second squared, it will appear that 1 psu = 1 foot.
Thatās assuming that your game takes place in Earth-normal gravity, instead of, say, on Mars.
Ah, so psu is not a setting you can control? Itās a consequence of other settings? That was not clear to me. Sorry for the confusion
Itās something over which you have full control, but thereās no API for it.
Let me try againā¦
Thereās no API to tell the renderer what the world units are, in terms of meters or centimeters. The renderer knows no units other than world units. Itās the application developerās job to make sure that models of people and houses are scaled appropriately for whatever world units they select.
Likewise (except for vehicles) Bullet is ignorant of any units other than psu. Thereās no API to tell Bullet what a psu is in terms of kilometers or millimeters.
But note that the mass scaling and unit scaling are not colinear. As unit scale (to meters) changes mass (to kg) changes at a cubic rate.
Something to watch out for if you think to start from real world units of some kind.
Edit: so in some cases (Iād argue most cases), it can be easier to leave units in meters and kilograms and adjust the other things to make that work. (Note that āeasierā does not always mean ābestā, though.)
Bullet doesnāt know about kilograms, either. The Bullet documentation says that masses of bodies should be as close to 1 as possible. The Minie documentation refers to masses being measured in āphysics mass unitsā or pmu.
o_O Can you provide a reference for that?
Seems like a pretty huge limitation if all forces are intended to be completely balanced.
Bullet 2.83 Physics SDK Manual, page 35:
Avoid large mass ratios (differences)
Simulation becomes unstable when a heavy object is resting on a very light object. It is best to keep the mass around 1. This means accurate interaction between a tank and a very light object is not realistic.
I wonder if their instability is also related to the fact that I think bullet only does gross estimates of inertia tensors.
In my home-grown physics engine, that was the key to getting a giant sailing ship to behave in non-silly ways when hit by tiny little spheres.
Anyway, today I learned that out of the 20 things I do much worse than bullet, my physics engine does at least one thing better.
Good point about the importance of inertia tensors.
Bullet (and Minie) allow users to customize the inertia tensor of each rigid body, but itās a fairly advanced topic. In my experience, very few users ever get that far.
Indeed. I have to relearn it every time I touch it and left myself plenty of notes and links to web articles.
Since my objects are made of blocks, I had the advantage of being able to calculate pretty accurate inertia tensors and centers of gravity. Itās just not as straight forward as one might think.