Giving an object a starting velocity

Hello!

I’m trying to simulate a bullet hitting a bullet trap. It seems to me the easy way to do this would be to start with the bullet a short distance from the front of the trap, turn on rigid body, tell it it’s travelling along Y at 1000 m/S, and press “play.”

Of course this doesn’t work, as there’s no way (that I can see) to tell the system the bullet is initially in motion.

I’m a total newb when it comes to animation, you’ll probably have to use small words with me.

Let’s try to explain with small words only…

To give an impulse to a rigid body, you must animate it. You must keyframe its position and also the “Animated” option in the Physics tab.

For example, you want your bullet you hit the target around frame 100. Go to frame 100, position your bullet close from the target. Keyframe its position and the “Animated” option as OFF. (Bring your mouse over the option and press [I].) Go back to frame 99. Keyframe the “Animated” option as ON. Go back to frame 1. Move your bullet far away from the target and keyframe its position.

To make sure things work correctly, select the bullet, go into the Graph Editor, press [A] once or twice to select all, then [V] to set the keyframe handles type. Choose “Vector”. (Otherwise the bullet will speed up and down in between the keyframes.)

Press “Play”. It works!

Now, to give a specific speed to your bullet, you must do some math. Convert the speed into m/s. Good, you already have that. Divide the distance by the FPS you’ll be using to render. For example: 1000/24 FPS equals 41.666 meters per frame.

So, instead of “far away”, your bullet should be 41.666*99 meters away from the target at frame 1 to hit it around frame 100 at 1000 m/s. That’s 4125 m… And it’s stupid to work at this scale.

Go into the Graph Editor, select everything in the list on the left and press [X] to delete.

Go to frame 3. Keyframe the “Animated” option as OFF. Go to frame 2. Keyframe the “Animated” option as ON and keyframe the position of the bullet far away from the target. Go to frame 1, move your bullet 41.666 meters backwards and keyframe its position.

In theory, it gives an impulse to the object and let it travel on physics only.

It works… but you better crank up the “Steps per Second” and the “Solver Iterations” in the “Rigid Body World” panel (in the Scene tab) or your bullet will just fly across the target without hitting it.

Sorry for the few long words.

[QUOTE=Kaluura;2484001]Let’s try to explain with small words only…

I was impressed by your neat explanation for the bullet problem and seek your solution to a different problem - involving rigid body dynamics.
I have a ball (active), a tall rectangular block (passive) standing on horizontal plane (passive).

I let the ball fall on the top edge of the block, so that it falls down along an expected parabolic path but on hitting the ground, it barely bounces but just trails off along the plane.
How can I get it to bounce up on contacting the ground into a smaller parabolic path, down again and into a few more bounces like a real ball until it stop.
I went to the Phys panel and set bounc=1 (perfectly elastic body) and also made chose rubber as material.
But no luck. The ball won’t even bounce once on the ground plane.
Any hope for at least one bounce?
{I’ve done this bouncing ball problem with key frames for a non-rigid ball}

Your help will be much appreciated.

I went to the Phys panel and set bounc=1 (perfectly elastic body) and also made chose rubber as material.
Did you also set the bounciness for the floor as well as the ball ? In the real world the amount of ‘bounce’ depends on the interaction of both materials

@Edsa: Glad I could help. As for your problem of bounciness, Richard said it all. Both the bouncing object and the obstacle/floor must have bounciness enabled for the effect to work. And don’t worry, making the floor “bouncy” doesn’t affect the objects which hit it if they aren’t also “bouncy”.

Just for your information, the materials that you can choose define only the weight of the objects, not their properties. You can make a ball of steel bounce on a sheet of paper… (I just tested to be sure of what I’m saying.)

Thanks so much, Richard & Kaluura. As suggested, I made the ground bouncy too and voila, the ball bounced beautifully and naturally, making progressively smaller parabolic curves as it advanced. (And to think I went through so much trouble for a similar result with a no-rigid body).
Thanks, Richard, for that instructive video clip.
And, Kaluura, I think it is misleading to give names like cork, rubber to bodies when they only reflect the mass, not property.