How to force UE4 to check Overlaps before Hits?
Simplified case to explain it all:
Actor containing 2 Spheres.
When the actor collides, the outer sphere overlap should decide if the inner sphere should penetrate the object or get deflected.
On high speed, the inner sphere hits the objects before the outer sphere overlap is triggered to do the calculations. (which should by design be triggered before, to decide if the hit should even occur)
How can we force the overlap event to trigger before the hit happens?
p.s. CCD enabled on both spheres
asked Apr 23 '19 at 06:30 PM in Blueprint Scripting
After reading through all the comments it seems that you just don't want an object to always be stopped by a wall and use overlap checks to allow it to penetrate this wall. You can use the Hit event to check if it should penetrate and manually reset is velocity and collision channel to allow it to continue into the wall. I'm pretty sure Hits give you a distance along the trace the hit occurred so you can even set it to the correct position as well. If it is meant to deflect then you can go ahead and do nothing.
answered May 01 '19 at 08:37 AM
I don't know if you'll be able to change the detection order, but you may be able to work around it with collision channels.
Set up two collision channels for your colliding objects, one that check for overlap only, and one that checks for overlaps and blocks.
Initialize your objects with the overlap-only channel. When an overlap is determined to become penetrating, change the channels of those objects to become blocking. When the two objects stop overlapping you can change the collision back to overlap-only.
Not sure if that will work in your specific, but it's an idea.
Follow this question
Once you sign in you will be able to subscribe for any updates here