Download

A precise Collision System

Hey, I’ve been on this problem for 40 hours or so… and so far no results.
I’ve switched from unity to unreal engine 4 for the physical blending on animation and I am trying to recreate what I had there.
I want a collision system that can let me pinpoint exactly which bone on my skeletal mesh collides with something, and if that something is another character, which of its bones collided with my character, so I can apply a specific force to both. It is a simple task, that of getting both bones’ names,their velocity and their mass. In unity, I had colliders as child objects to the bones, and when hit events were triggered, I looked at which collider triggered it. Right now, the task seems impossible in Unreal. Here is what I know:

Character Collision is not really documented. From what I experienced, only the root capsule(which is not precise enough for what I want to do) is able to hit something if this something is not simulating physics. For exemple, if I make another collider as a child of the capsule and place it on the hand of the character it will pass through anything that is not simulating physics. Since the other thing I want to hit is an animated body, simulating physic on the skeletal mesh itself won’t work. Physics Assets are also out of the solutions because of this weird behavior, and only interact with physics driven objects. Hit is out of the way. But what about overlap? Well, character’s capsule collider lets us use overlap events on child colliders,unlike hit events. The only problem is that even though the collision is detected, sweep result is never populated, which makes me wonder what is going on. The overlap is registered, but the trace that detected the overlap says it never hit anything. I need this sweep result for the impact point, so I can pinpoint which bone is near this point on each body. I’m at an impass right now, and I am wondering if this is possible at all.Saw multiple post on this subject already, none answered. Any one got an idea on how I could achieve this?

The collision detection would be from a socket that is attached to a bone, you can attach colliders to these sockets just like you had in Unity. Could you post a video of what it looked like in Unity? Thank you

Yeah if you attach different capsules to the different sockets and give them overlap or hit events that will only collide with pawn’s then you should be able to get it fine.

Hey! I’ll send a video thuesday of what it looked like. Here is what I’m talking about. I’ve added a capsule to my character left fist:


it is visible on his fist. Now I have a sphere collider on the pawn, and the pawn’s mesh is also set to collide with objects. Here are the 3 collision settings:
The fist collider
90900cbba2ddeaed34b1722601ee35995f257c46.jpeg
The sphere on the pawn

The mesh on the pawn

Here is the “collision detection system” in place when I test, when a hit on the left hand occurs, it should be called
094581a08eb3f11ff994c6a1473bca8b67d7773c.png

Here is what I get when I hit a sphere
0032813b92f764fdc94775bd0e3aa42ebb21aa56.jpeg

Here is what I get when I hit my pawn
480d1dbae4f463d2a56e987dd5dc6f4273683521.jpeg

If I use overlap, the sweep result in beginoverlapcomponent() is never populated. Does it serve a purpose?

Hey, I’m back with a solution. Using traces, here is how I do it!

cee33da2211b8c9b82727628b04c233ad7296022.jpeg

This is for one arm only, gotta do it for both, but the hit result is populated! I suggest changing the trace channel if you don’t want anything else triggering it!

Zeclown,

How did you end up getting/calculating velocity for the bone? I’d like to be able to continuously monitor the velocity of a specific bone on my character (finger).