Video reference: Watch ricochet bugged | Streamable
-
What do you want to achieve?
Stop the FastCast projectile from going through the wall and have it ricochet as it should. -
What is the issue?
FastCast projectile has the chance to go through the wall and hit a part on the other side before ricocheting -
What solutions have you tried so far?
I have tried referencing other people’s scripts and looking through the DevForum to find a solution to my answers but I have come up empty-handed. I am pretty lost on what to do.
I am using the latest FastCast version.
FYI
Green spheres mean the cast cannot ricochet,
Red spheres and linehandles mean the cast can ricochet
local ricochetNormal = cast:GetVelocity().Unit (2*segmentDir.Unit:Dot(rayResult.Normal)*rayResult.Normal)
cast:SetPosition(rayResult.Position)
cast:SetVelocity(ricochetNormal*cast:GetVelocity().Magnitude)