There is a slight issue with the bullet offset; to explain whenever i look at different coordinates the offset will change, the offset is exaggerated to further illustrate the issue.
I have made the offset so that it would fire to the left but changing camera angles seems to displace it
local Angle = Vector3.new(1,0,0) -- exaggerate bullet offet
local Pos = charWeapon.Shoot.Position -- weapon shootpart
local direction = (mouseHit - Pos).Unit + Angle
CasterModule.CreateCast(Pos,direction ,700,mouseHit)
I believe that could be the right awnser but the way i set up my recoil is with a large table with random vector3’s. So while the ShootPart will be in world position the Recoil pattern will be in Object space
Yes i can use Math.RandomSeed which is ultimately the same thing
Im using seeded Recoil which is independent from server - Client which is what most E-Sports Fps use instead of generating random offsets in the spot.
This was ultimately the solution i had to use CFrame.fromOrientation and it worked just fine
thanks you guys for helping
local Pos = self.Weapon.Shoot.Position
local directionUnit = (self.mouseHit - Pos).Unit
local directionCF = CFrame.new(Vector3.new(0,0,0), directionUnit)
local spreadAngle = CFrame.fromOrientation(math.rad(10), 0, 0)
local direction = (directionCF * spreadAngle).LookVector
I’m not sure where it is in FastCast. I’ve only applied this method to my own systems, so I’d recommend you create a separate topic for it so people who do know can answer the question.