Collision Traces Has Gaps (NEED HELP)

Hi, I’m wondering if anyone knows how to fix the gaps between collision traces. I have a sword and I define it’s attack collision using a multi-sphere trace using two sockets I make on the weapon. I used the even tick node to activate the traces, and that’s were I started encountering the issue. If the Anim Montage is playing at a high speed then the gaps of the traces becomes wider, but if the Anim Montage is playing at a slow rate then the gaps become shorter. Does anyone know how I can fix that?

Any suggestions are appreciated, even if you don’t know if it will work or not.

It’s sounds like you’re describing how if you animate an object in between frames the space between is missed.
image

You would need some kind of sweep test between frames. It won’t necessarily be 100% correct either if the sword is curving, so it may help to add some in between traces for large distances.

Also sweeps don’t take rotation into account so this makes it slightly harder and more annoying, but with enough in between sub checks you can make it more and more accurate.

Sweep test with no sub steps
image

Sweep test with a few more substeps. The more the object rotates between frames the more substeps help, until you eventually stop missing collisions.
image

You could determine the number of substeps by finding the angle between two frames and having a min angle threshold between substeps.

When the angle doesn’t change at all, the sword can do a simple sweep test between frames to catch all collisions along the way.

2 Likes

Thanks for the reply! I just got a plugin that does three different traces so I wouldn’t miss anything in-between the traces, however I ran into another issue. This plugin I’m using is called “Did it hit” and it traces every other tick. I’m going to use one your images to draw this out bit better.
01
In your example the plugin will trace on Frame 0 and then skip Frame 1 then trace again at Frame 2. Then it would make two different traces from Frame 0 to Frame 2 and fills up all the gaps.
02
So the traces will kind of look like that and as you can see it totally missed the arc or curve of the attack. I can’t make the system trace at every tick or else it would crash the system and the engine. So do you know how I can fix that or make it better?

I contacted the seller and hopefully he knows how to fix this.

Not sure what he’s doing but I’d have done something along the lines of making multiple sub step iterations based on the current transform and the previous frame transform.

It’s kindof similar to what the CCD (Continuous Collision Detection) checkbox does.

I’d pick some nice amount of substeps to perform based on the difference in rotations between the last frames. You need 0 substeps with 0 rotation because a sweep test will do.

You could try to do some kind of quaternion threshold. This would be similar to degrees where for example you subdivide by a threshold of 5 degrees as an example, only here it’s in 3D so you need to subdivide by some full 3D quaternion threshold.

1 Like

Thanks for the reply! I’m not sure how to make complex collision traces and the one I brough is also beyond my reach. I plan to buy a better collision trace since I don’t think I can make a collision trace that complex, although if you think about it, if your game is running on low FPS it’s bound to miss some traces. Part of what I’m trying to do is to make the amount of times you miss as low as possible. So it doesn’t have to be perfect.

So you got the “Did it hit” but didnt work out for you and now you’re going with what exactly? would love to hear what worked out for you

Thanks for the question. Sadly I could not figure out something that works perfectly and so I’m still, to this day, experimenting with random things. I’ll probably make a post here if I figure something that I might be interested in sharing.