Download

Sphere collision under scale of 1 does not appear to work

In an attempt to do some collision on circular objects inside of other targets, for exmple a classic shooting target, I figured a cheap way would be to make some spheres and make the Y a small scale to be paper thin, like .1 or smaller, and get away with everything. Overlap and Hit events dont seem to register at all, unless if its around .1-.5 and u hit dead center. Anywhere else on the sphere does not register an event. Is this intended? Or is there a bug in sphere collision when its not a perfect sphere and the scale is paper thin like a disc on one side?

If this is not a good approach for testing a gun target, for points earned on each circle, what is a good one, or recommended approach to accomplish this task? I didnt see a way to add paper thin collision spheres or objects. Would a static mesh imported that is the desired size even work if a sphere does not? Obviously sphere collision only scales to a perfect sphere.

Thanks

Scaling a sphere collision is indeed not the best way, as this type of collision works by determining the distance to the center of the sphere, which works only for a uniform scale.

However, if you want to determine the score for shooting a particular area of the target, I think you only need a single, cylindrical convex hull that’s roughly the size of the entire target, and when hit, you can work out the distance from the center (with the appropriate projection to stay in the target’s plane, so its thickness doesn’t affect the result).

If your target is indeed paper thin, you might want to still add some thickness to the collision shape, or use a trace to prevent the projectile from passing right through without triggering a hit event.

Ok I figured I could do calculation, was just hoping for something simpler if multiple meshes could have their own multiple targets… instead of finding calulations for each variation I just wanted to drag and drop. Thanks

You also have the option to use as many sphere collision shapes as you want, and still use a cylindrical shape to register the hit; you can then check which spheres the projectile is intersecting to determine where it impacted.

Interesting, how can you use a sphere collision shape that has a flat circular top like a cylinder to accomplish the goal of a flat circle with some depth to capture collision?

What I meant was using both spheres (for each section of the target), and a flat, cylindrical shape to register the hit; when you know the target was hit, you then use the spheres to determine where the projectile hit the target.

Perfect. Thanks KashK. Ill try that.

I just used the cylinders and works like a charm… thanks! Kept thinking in Polygons, Triangles, Cubes and Spheres and that totally slipped my mind. Thanks again!