Issue with FPS Framework

  1. What do you want to achieve? Keep it simple and clear!
    Hello there, I am trying to make an FPS Framework, so far it is working well but I have ran into an issue
  2. What is the issue? Include screenshots / videos if possible!
    The problem here is that my bullets are offset from the mouse

Here I am using FastCast to do the bullets, my code is down below

self._AddConnection(RunService.Heartbeat:Connect(function()
		if UIS:IsMouseButtonPressed(Enum.UserInputType.MouseButton1) then
			--shoot
			local HolePart = self.Model.HolePart
			HolePart.Anchored = true
			local HolePos = HolePart.Position
			local normalizeRay = workspace.CurrentCamera:ViewportPointToRay(self.Mouse.X, self.Mouse.Y - 36)
			local ActiveCast = self.Caster:Fire(HolePos, normalizeRay.Direction, self.GunConfig.BulletSpeed, self.FastCastBehaviour)
			self.Springs.shoot:shove(Vector3.new(rng:NextNumber(-0.5, 1), rng:NextNumber(-0.5, 1), rng:NextNumber(-0.5, 1)))
		end
		--cooldown

	end))

What I expected to happen: The bullets are firing and go towards my mouse
What happened: The bullets are offset from the mouse

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I’ve tried switching to ViewportPointToRay but I still had the same issue

Thank you for reading

Try doing + 36 instead of doing - 36?

1 Like

Okay I think I have a conclusion done here, I’ll just keep adjusting the offset, I also think that the bullet drop that FastCast is doing might also alter the position a bit so thank you for your help

1 Like

Anytime! if you have anymore issues don’t be afraid to make another post!