How would I creat a "hit" detector?

I’m trying to figure out a way to set up a rigid body simulation to drive a “hit counter” of sorts for an animation, not a game. I’ve included the blend file and a diagram of what I’m trying to achieve.

The idea is that the empty at (1) controls the rotation of a (beam) at (2) which is simply a single edge consisting of two vertices. When it is rotated it moves the single vertex (HIT) at (3) until it makes contact with the (target) at (4). Once (HIT) makes contact with the (target) the idea is that when the vertex and whatever it’s child is make contact with the faces of the (target), they would be pushed along it (and (beam)'s) local z axis.

I was thinking that setting this up as a rigid body simulation using a slide constraint would work, but so far that isn’t happening. I’ve tried a number of different constraints and modifiers but nothing is getting me the result I’m after. Maybe this isn’t possible in blender, but I thought it was worth a shot asking you guys if anyone knows a method that would work or can puzzle one out.

Blend file below (I hope!) with no constraints or modifiers, just the objects and empties parented the way I’d like.

hitXp.blend (590.7 KB)

Thanks!

Why do you need a simulation and a hit counter when you can just keyframe everything?

Because keyframing several objects doing this across the surface of a complex object would take forever. If it can be simulated it would be much faster set-up wise. If I end up having to keyframing it I do, but if it can be simulated that would be preferred. My reasoning is that I can duplicate the objects with their constraints as many times as is necessary and not have to wade through what would end up being scores of individual keyframes to achieve the desired result.

Not sure if this is what you’re after, but anyways here is “everything keyframed” version:
hitXp_edit.blend (586.8 KB)

1 Like

Thanks, but to be clear I know how to keyframe everything. I’m trying to avoid doing that. Any solution that requires keyframing everything is not what I’m after.

This illustrates (very roughly) why I’m trying to avoid keyframing every “hit”.

hitXp1.blend (1.6 MB)

And this is the motion I’m after. It’s supposed to be a beam (laser, phaser, big-o’-beam, whatever :thinking:) and the “emitters” (ray and hit parented to empty/turret) would track the target. As the (HIT) bounces across the surface of the target it would automatically follow as closely as possible the faces of the target. It’s more or less an attempt to simulate the sort of ray-casting that’s possible in Unity or UE4. I was just hopeful it was possible. If not… well then it’s back to muh drawring boards.

hitXp2.blend (600.9 KB)

Loved your Portal project BTW. Very cool!

I don’t know if you’ve seen, but I made a tutorial on creating dynamic shield effects like that.

1 Like

I will certainly have to play with the dynamic paint setup. That may be exactly what I need. Thank you!

1 Like

Glad to help! Let me know if I can help with anything else!

1 Like

I’m trying to set some tests up, but my son is home from school today so I’m betting I won’t have anything solid until tomorrow sometime :rofl:

1 Like