Probably my first time asking for help here and I hope I would receive some.
Anyways I am trying to make an ADS system by manipulating the players arms and I am failing to do so.
I am sure you all know what ADS is which basically means making a gun aim properly.
I am using a basic CFrame math that moves the players arms to the players camera to simulate a ViewModel. It works extremely well! But the issue occurs when it comes to finding a formula for aiming.
local aimSight = tool:FindFirstChild("AimSight",true)
Aim_ArmOffset = Camera.CFrame:VectorToObjectSpace(Camera.CFrame.Position-aimSight.WorldPosition)
local torsoToCamera = Torso.CFrame:ToObjectSpace(Camera.CFrame)
armOffset = armOffset:Lerp(cameraCFrames.BobbleCFrame*CFrame.new(0,-1.4,-0.6)*CFrame.Angles(0,cameraVelocityY*2,cameraVelocityY/2),deltaTime*10)
shoulderCFrames.rightShoulderC0 = torsoToCamera*CFrame.new(Aim_ArmOffset)*armOffset
shoulderCFrames.leftShoulderC0 = torsoToCamera*armOffset
Of course! I am not going to show my entire code but this is the most you need to know. It shows an aimSight
attachment and Aim_ArmOffset
which is where the real maths come and where I fail.
What I want is:
I have tried:
That’s all thanks.
1 post - 1 participant