Aim down sights is never in the centre of the screen

The red dot is the actual centre of the screen. My ADS is NEVER in the middle of the screen and it’s genuinely extremely annoying because that is where bullets land.

The way my ADS system works is via a part in the gun sights, and then this line of code:

				local TWorldS = viewmodel.PrimaryPart.CFrame:ToObjectSpace(tool.Sight["Aim"].CFrame):Inverse()
				local aimcf =  (camera.CFrame*walksway*jumpsway*strafesway*CFrame.Angles(math.rad(sway.Y*swaysize/2),math.rad(sway.X*swaysize)/10,math.rad(sway.Z*swaysize)/2))+(camera.CFrame.UpVector*(((TWorldS.Y))))+(camera.CFrame.LookVector*((TWorldS.Z)))+(camera.CFrame.RightVector*((TWorldS.X)+(-(sway.X*swaysize)/75)))

				if tool.Root.Alpha.Value > 0 then -- alpha is to make a smooth "tween" into ADS/out of it. it's not an issue with this as its precisely one
					swaysize = .2
					viewmodel.HumanoidRootPart.CFrame = viewmodel.HumanoidRootPart.CFrame:Lerp(aimcf, tool.Root.Alpha.Value)
				else
					swaysize = .8
				end

I’ve tried extremely hard to line up the “AIM” part with the reticle of my optic. Currently, I clone the optic’s reticle and move it back to use it as the “AIM” part, so I heavily doubt it’s an issue with the reticle.

The game if you are interested in experimenting with it:

Could you just move the part that’s in the gun sights towards the middle of the screen?

1 Like

I should be more specific on my last reply, I meant to ask if either the optic or a part inside the optic isn’t centered properly on the gun

It’s hard to say what the issue is without accessing the game

The aim part lines up on all the axis with the reticle, as it’s literally the reticle duplicated and moved backwards. The aim part is the grey part.

Reticle Position: 14.277, 1.324, 35.822
Aim Offset Position: 15.348, 1.324, 35.822

You’re probably running into a floating point precision issue. Not sure if it will work, but I’d try replacing the Aim part with an Attachment that’s parented to and offset from the reticle as it will more accurately represent the reticle’s CFrame as an origin

My solution, I guess. It’s still not entirely accurate, but it’s much more accurate then the other one. The multiplication by -1.7 is to centre it. Probably a much better way to go about doing this; but it works well enough for what I need. Cheers for replying.

				local aimcf =  (camera.CFrame*(CFrame.new(walksway.X, walksway.Y*2, walksway.Z))*jumpsway*strafesway*CFrame.Angles(math.rad(sway.Y*swaysize/2),math.rad(sway.X*swaysize)/10,math.rad(sway.Z*swaysize)/2))+(camera.CFrame.UpVector*((TWorldS.Y)))+(camera.CFrame.LookVector*((TWorldS.Z)))+(camera.CFrame.RightVector*((TWorldS.X)+(-(sway.X*swaysize)/75)))
				aimcf = aimcf * CFrame.new(0,-1.7,0)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.