This all depends. Basically if physics engine can catch projectile colliding it will recalculate positions and raise events. And colliding depends on velocity, thickness of wall collision and thickens of projectile collision, and on FPS.
However to make sure if its because of velocity, lower it to 500 or even less and see if those errors still happen.
ps.
i think 3200 velocity means 3200 m/sec. Which means you have hypersonic knifes in game. ie 11520 km/h (7158 miles/hour). Do you making superman game by any chance? (it may be alos 3200cm/hour, which makes 71 miles/hour)
pps.
if you have code that calculates anything on event tick, you should adjust values for delta time.
This is something I’ve looked into for a projectile system, and the solution I ended up using was making the Collision Box the Root Component, and adding a Projectile Component to detect hits. The Collision can then have its physics enabled and can be manipulated to add things like impulse, and the Projectile Component handles the actual hits.
I believe the Projectile Component utilizes substepping by default, and its hit outputs are more accurate/quicker/reliable than a Collision’s overlap detection. The downside is that Projectile Components are apparently a little bit non-performant.
You could also run a line trace from the center of the object, positioned/scaled to its forward velocity. I’m sure there are other solutions out there as well so I’d suggest looking into accurate physics objects and high-speed projectiles if you haven’t already as they’re representative of the same idea, even if your flying utensils aren’t moving especially quickly.
Whever the wall thicness is smaller than the object@speed you have possible penetration.
So a 1cm bullet flying at 2m per tick
And a wall of 10cm will almost always result in no collisions.
In fact, you can guess the rate of hits to be equal to 2/.10 or about 20%…
A quick cheat would be to scale the collision capsule in the direction of travel by speed of travel.
So each tick your collision is sweeping the whole pathway regadless of substepping etc.
Obviously you end up hitting a wall way before the wall is reached if you increase speeds a lot.
What does the end of your knife look like? My assumption is that the collision on your knife’s mesh comes to a single vertex at the knife’s edge, or is otherwise incredibly thin. I ask because the knife in the video phased through the wall at a much lower velocity than it was hitting the wall earlier, and as it was coming down on its tip. If that’s the case then a simple solution would be to just manually scale up the knife mesh’s collision.
I tested it myself with very thin rectangles (5 cm x 10 cm x 1 mm) placed within 5 cm^3 Box Collisions and provided a very powerful impulse and still they collided with the wall more frequently than not. Applying CCD to both the mesh and the Box Collision seemed to add additional accuracy and it now takes some effort to get them to phase through the wall.
With that being said, you could still use a line trace. Line traces are probably more efficient than any physics adjustment and are neater than scaling the collision box, but require some math to get the kind of behavior you’re looking for. It’s doable, but I made that suggestion earlier because I mistakenly thought you were looking for an accurate hit rather than multiple physics bounces.
Make CAPSULE collision for knifes, you can edit it in mesh editor (open knife mesh in content browser by double clicking it). Then you can change to capsule and edit its height and radius.
At this stage only solution is to change step by step all elements until you find one making trouble.
I have used the capsule collision as an alternative and I don’t want to use it because the knife will now roll witch looks really bad. I couldn’t make the object to penetrate walls in my testing.
It is also really hard to test since it does not happen often but it does happen.
Point of trying capsule is to try something else. If passing trough stops with capsule You will know it is collision shape. So then you can make custom collision until you find shape that suits all requirements. And capsule is second most efficient collision right after sphere.
First of all, look into substeps.
There’s no reason that the collision has to be frame dependent (but then make the calculations using the sub stepped values).
Second, if you use the projectile system stuff will run better in terms of collision at least. If you can, you may want to consider that.
Third. You can make your walls have a 10m deep collision, and it should automatically stop penetration assuming the math checks out.
That’s Easy to do on outer walls, and not possible for walls in the middle of a level though, so…
Fourth, Correct. Don’t rely on physics. Particularly since Chaos the system is a mess (apt name really). You have very little control and really bad/inaccurate simulations most of the time…
So see point 2…
This requires very precise collision. I would love to simply have everything powered by physics and no animations. However, that might not be possible to achieve what I want.