Best way to have a bullet fired from a gun (with physics)

Hello all!

I have gotten into a project that involves a revolver being fired, along with physics to control the bullet after it’s been fired. Each cartridge is composed of a bullet (the actual moving “tip”), and the casing/shell. I’m wondering on how I can effectively have the cartridges parented to the revolving chamber, and be able to disconnect them when needed for the revolver to fire (and then eventually reload).

I’ve already explored a couple options, however I’ve hit dead-ends on each one.

Firstly, I have the good ol’ parenting a shot. However, the obvious issue is that it’s impossible to keyframe a disconnection between a parent and child.

Secondly, I tried using child-of constraints. And while this seemed to give some promising results (after setting it up in the most painstaking way imaginable), they seemed to just revert back to some really messed up state (where the bullets placed themselves deep inside of the casing).

Thirdly, I looked into the Dynamic Parenting plugin, which seemed great at first; however, as soon as I went to play the animation, each cartridge got all jacked up and didn’t want to cooperate. I then had to undo this to get them back to their desired state.

Are there any other feasible options? I’ve tried everything within my current knowledge. Any help is appreciated, and thank you!

The Blend:
RevolverDynoPaint.blend (952 KB)

Well, in a straight forward world, I’d leave the bullets as you have them, children of the cylinder. In the rigid body physics properties panel there is an ‘animated’ checkbox, checking that will cause the object to be controlled by the animation system. Likewise, unchecking the box, the object is controlled by the physics sim, and you can keyframe the changes to the checkbox.

See attached .blend file. In that file, I added rigid body physics to bullet.005 and set it to be controlled by the animation system till frame 67, on frame 68 the physics takes over and the bullet drops because I didn’t setup anything to make the bullet fire. It just drops due to gravity and lack of collision with anything.

You haven’t mentioned what type of physics system your using to control the bullet, so this might not work for you in your case.

Randy

Attachments

RevolverDynoPaint.blend (863 KB)