Jump to content

Body freez problems


Recommended Posts

I want to find the maximal frozen linear velocity for upper body that will be enough to unfreeze body in such situation.

What parameters I must take in count (exact formula, if possible)? As I see, there are dependences at least of gravity, physics fps, and some times of mass :) (if stones in video have masses of 100kg each, the upper will stay freezed. But with 10kg each - upper stone will fall)

Link to comment

Of course, gravity and mass (and therefore inertia) define what would be the velocity of the object in the current frame. Simply set the physics FPS as you need it, set the body mass and decrease the frozen linear velocity to make the body fall. That is the easiest way.

 

Btw, physics FPS=100 is very high. It means, physics is calculated once too often (see details here). Usually FPS=60 is enough.

Link to comment
Of course, gravity and mass (and therefore inertia) define what would be the velocity of the object in the current frame.

So, for example we have freezed body and no forces except gravity. At each physics frame the engine will calculate possible velocity change for that body. If that velocity is larger than freez velocity, body unfreezes. Otherwise, body stays freezed. The question is, since the gravitational acceleration applies to bodies regardless of their masses, why should the body's velocity in gravity field depend on mass?

 

Simply set the physics FPS as you need it, set the body mass and decrease the frozen linear velocity to make the body fall. That is the easiest way.

Yes, but I will set that velocities for great number of bodies of different masses (possibly, runtime generated). That's why I need exact formula (or explanation of algorythm) of unfreezing. I'll do that work in script.

 

Btw, physics FPS=100 is very high. It means, physics is calculated once too often (see details here). Usually FPS=60 is enough.

I have a chain of bodies with joints of different types that interacts with bunch of other bodies. So, it needs at least 100 physics FPS and about 20-30 joints iterations to avoid unnatural behavior in most situations.

Link to comment

So, for example we have freezed body and no forces except gravity. At each physics frame the engine will calculate possible velocity change for that body. If that velocity is larger than freez velocity, body unfreezes. Otherwise, body stays freezed. The question is, since the gravitational acceleration applies to bodies regardless of their masses, why should the body's velocity in gravity field depend on mass?

It is true, gravitational acceleartion does not depend on the mass. However, it is the force that is calculated. Basically, each frame the following is computed:

resulting force exerted on a body = gravity * mass + other forces

then

resulting linear velocity of the body = force * (imass * ifps) + linear velocity

 

Yes, but I will set that velocities for great number of bodies of different masses (possibly, runtime generated). That's why I need exact formula (or explanation of algorythm) of unfreezing. I'll do that work in script.

It is complex and won't be exact in any way. It is MUCH easier to go through various values manually.

Link to comment
Basically, each frame the following is computed:

resulting force exerted on a body = gravity * mass + other forces

then

resulting linear velocity of the body = force * (imass * ifps) + linear velocity

 

Thanks :)

Link to comment
×
×
  • Create New...