There’s many usage cases for this but I’ll mention three off the top off my head:
-
Player is driving his car and hits an enemy
-
Currently I’d have to set the enemy to a ragdoll state after the .Touched hit triggers, which really messes with the vehicle velocity because it thinks it hit an player and thus slows down very fast
-
Use magnitude/raycasting/Region3/Hitbox checks to predict what I’ll hit. This is just wrong. Not only is it innacurate, it’s also inefficient and very hacky.
-
With Part.SoonTouched (wip name) it’ll say “Hey next frame this part is gonna be hit” and I’ll have time to replace the character with a ragdoll and everything will work super smoothly
-
Player is driving a vehicle (tank?)
-
Tank runs into fence
-
Tank bounces back
-
.Touched is triggered and the fence is destroyed
-
Tank now rebuilds velocity and goes through it
-
This is just ugly
-
Debris falls from fragmentation of a wall/building/destroyed vehicle part flying
-
Debris hits player
-
Bounces back
-
.Touched triggers
-
Debris is still flying the other direction because it thinks it hit something it couldn’t move
-
With .SoonTouched I could ragdoll the player the frame before and let the physics demolish the ragdoll using the debris like it should
Not sure if there are any performance issues with this. If there are - maybe make it so that the engine only checks for .SoonTouched if there’s code that asks for it.
Here’s an example of the current way things work (Video 1) + how they would work if roblox implemented this for us (video 2). Credit @1waffle1