These recent updates are excellent! I love that you incorporated the reflecting right into the example gun. I have to say though, I didn’t realize that I could use the Pierce function for so much more than just going through specific walls. I’ve been toying with it a bit and it’s actually a super helpful function.
Regardless, being able to change the velocity, acceleration, and position of my casts on the fly, along with pausing/resuming them is great. I already have a couple ideas in mind for what I’m going to do with these. I believe the most helpful new addition I’ve started using is the UserData table. It’s really nice to be able to throw variables into this table rather than passing that variable through like 4 functions.
All of these changes are very welcome, although I do have a question. Is there some way that I can still pass in my own cloned CosmeticBullet rather than the module doing the cloning itself from the template it’s given? In FastCast Ver. 10.0.0, the user is required to clone the bullet themselves and pass it in, and while the new template functionality is much cleaner, passing in my own cosmetic bullet was crucial to incorporating FastCast with the PartCache module.
Basically, this was my code before:
-- Get a bullet from the PartCache
local bullet = BulletCache:GetPart()
bullet.CFrame = CFrame.new(FirePointObject.WorldPosition, FirePointObject.WorldPosition + direction)
bullet.Parent = CosmeticBulletsFolder
-- Fire the caster
Caster:FireWithBlacklist(FirePointObject.WorldPosition, direction * BULLET_MAXDIST, modifiedBulletSpeed, blacklist, bullet, true, BULLET_GRAVITY, CanRayPierce)
As you can see, rather than cloning my own CosmeticBullet, I get one from a PartCache, and then give the FastCast module that bullet. While I could probably get by without using the PartCache module, my game is most likely going to need it so that I can keep it as fast as possible. I’ve been looking through the documentation and also the FastCast module itself for somewhere I could edit the PartCache functionality in, although honestly I’d rather leave the FastCast module as it is so that I don’t have to put the edits in with every new version.
Perhaps doing this is still possible and I’m just missing it somehow, if it is then I wouldn’t mind a pointer where haha. Other than this though, I’m really loving the FastCast updates! It took me a bit to get around to incorporating it into my game, although I find that all this new functionality is already paying off!
EDIT: One more thing, is there some reason we’re not allowed to Pierce water? In the previous version of my guns I had a BULLETS_IGNORE_WATER variable, although now I can’t seem to get it to work. It’s for deciding whether bullets should stop or not when they hit water. Editing the cast with cast.RayInfo.Parameters.IgnoreWater = false has an error specifically for that case for some reason. I could just disable the error() call, although I’m wondering why that might be a fatally bad idea