i dont seen hello physics need to set gravity so i assume this is some issue in 3.2.2 physics (i belive it might be fixed in 3.3 or even 3.2.3). i will need to upgrade as quick as possible.
edit:
it still dont work. i thought it was fixed, but it return to its original rotation state just longer time
below video is mass 1f with gravity set like rigidBodyControl.setGravity(new Vector3f(0, -1, 0));
this is madness see 30 sec +
i think i got it. when i apply in blender i had this models in position above plane (so node point is in below).
but then question for you. How do you solve it? do you have models saved in blender with center in physics center or you calculate some model bounding and move it to have geom center in node center?
what i want to say, i got ALL blender models “above” center origin that is “ground” for me.
I don’t know how others do it, but I tend to make my models with their local origin in mind… so that are either sitting on the ground plane or centered on origin depending on what I will do with them.
Are you using hull collision shape ?
This should not happen with cylinder shape I guess.
In case this is because mesh origin, you should be able to set origin to centre in Blender using:
Tools → Set Origin → Origin To Center Of Mass (Volume).
I do not know if we can set it directly on collision shape in bullet so.
wow, i probably seen this option many times, but never thought it is there
i was thinking about using boundingBox center as center, but it might be not accurate. this option you told is very accurate i belive. The only problem is i will now need add offset when place elements in game.
Try with setting your mass and gravity values to some more ‘normal’ values.
Try setting a mass of 50f on the barrel and a gravity vector of (0, -20f, 0) on the physics space. Gravity in games is often set to higher values (a value greater then 0, -9,81, 0 ) to make it feel more like in real life.
I’ve always thought this was weird… and it’s definitely true. Real life, ~10, game life, 20. I think I finally figured out why it’s the case, though. It’s a few factors:
field of view is a small part.
the main part is that games overscale everything. The smallest closet is like 10x10 meters. So of course gravity will have to increase.
maybe it is because i add physics for superNode it is:
Node(some location, i add physics control to it) → Scene Node(0,0,0) → Cylinder Geometry([0.0, 0.53999996, 0.0]) → mesh itself (idk how positioned it is)
yes, since i add physics for node, not geometry (that i never did before for dynamic objects)
the geometry need to be in center of this node too, so i needed to have blender object origin match not only center of model gravity but also blender origin center, so now it works
also thenks for explain about difference with gravity speed.