Every shot duplicates the input RaycastParams
instance for the exact problem you mentioned above.
This code is visible in `ActiveCast`
local function CloneCastParams(params: RaycastParams): RaycastParams
local clone = RaycastParams.new()
clone.CollisionGroup = params.CollisionGroup
clone.FilterType = params.FilterType
clone.FilterDescendantsInstances = params.FilterDescendantsInstances
clone.IgnoreWater = params.IgnoreWater
return clone
end
Unfortunately, this methodology does violate Roblox’s proposed standards of using a singleton instance, but in the scope of module functionality vs. usage of cast parameters, this is the better choice.
It does not, FC has been limited to line segments for its entire lifetime. I’ve been investigating ways to reliably do this, but it doesn’t seem to be possible right away, at least not without critical performance losses. I’ve looked into a lot of methods from using an Explosion
instance (or line of them) with a diameter of the segment’s length (effectively it makes a sphere encompassing a given segment), casting a number of rays out from each segment, and a couple more radius-based detection methods. All methods have proven to be slow/expensive, unreliable, or problematic in other contexts (unwanted interference with the developer’s game, specifically).
I may experiment with more methods, but I want to add resolution enforcement before anything else.