How to set the initial velocity of a rigid body at a predictable value?

Hi all,

I am trying to have a rigid body (a cube) with a defined initial velocity (0.1 units per frame along x).

I keyframed the x location at (frame=0, x=0) and (frame=250, x=25) with the keyframe handle type set at vector.
I keyframed the “animated” checkbox enabled at frame=0 and disabled at frame=20.

It seems to work. Disabling the gravity and setting at 0.0 the “translation damping” of the rigid bodies, the cube keeps moving after the frame 20 at a constant velocity, but it is faster then expected.

To check the velocity of the cube, I added another cube with the x location keyframed as the first one, but with the
“animated” checkbox enabled for all the simulation. This second cube moves along the x axes at 1 unit each 10 frames, and I take it as a reference for the velocity.

Changing the frame at which the animated checkbox is disabled, the result changes:
if it is an even frame (18, 20, 22) the cube moves faster then the reference,
if it is an odd frame (17,19, 21) the cube moves slower then the reference.

Here is the blend file [ATTACH]422984[/ATTACH]

Is there any way to have the rigid body keep moving during the simulation at the same velocity as when it is animated or at least at predictable velocity?


Very strange - I think that this is a fault of the rigid body calculation. So there is probably no “clean” solution.

You can try solving this by increasing the amount of computational steps for rigid bodies:

  • in the Scene tab go to the rigid body world panel
  • increase the Steps per second (for high-res simulation I go as far as 200)
  • additionally you can try increasing the Solver iterations, maybe this helps too (this is actually only for constraints, but who knows how it is handled in the calculation…)

I have two questions regarding your question: :slight_smile:

For which reason do you want the cube to move so accurate?
Do you really need the animationless rigid body (or could it not just be done with keyframes)?

thanks for your answer.

I played a bit with the parameters you suggested.
Increasing the Steps per second reduces a lot the differences of the velocity.
Increasing the Solver Iterations seems to have small or no effect.

I got the best effect by setting the Speed of the simulation to 2.0.
There was almost no differences of velocity.

Strange, but with speed of simulation set to 3.0 the differences appear again.

Regarding your questions, I want to use Blender to make some animations to support lessons of mechanics.
I started using keyframe and, mainly, drivers. I am testing the possibility to include rigid bodies in the scene to take advantage of the Physics features of Blender.

Thanks for that info! In this case the only way to solve the problem is -at least as far as I know - to experiment with the Steps per second and time values.