Roblox Gun Kit Shoulder Camera Removal

does shoulder camera removeable??

i want normal cams or first person cams

1 Like

im also trying to find out how. this is what i found out
in the constants variables in the shoulder camera module theres a line which says

self.normalOffset = Vector3.new(2.25, 2.25,10.5)

if you change the x axis to 0 ( first number out of the 3) then the camera wont follow you. It will freeze and not follow your character

you can change it to anything except for 0. and only for the x axis. if you set the rest of the numbers to 0 nothing will happen

1 Like

i read an article about this on the forums, go try and find it instead of making a post abt it

2 Likes

can you link the article here please

1 Like

yes i edit it but its freezes and not following player’s cam

1 Like

can you put link here please???

1 Like

same for me im trying to find out best offset we can do is 0.001

1 Like

[Weapons Kit] Removing Shoulder Camera and replace it with First Person Camera this may help

2 Likes

Thanks but that post does not have the solution.

1 Like

CHECK it more. it contains a line of code that fixes it

1 Like

:skull::skull::skull::skull::skull:it does not. the guy giving the solution didnt know how the camera module works.

1 Like

hey bro i found a solution. I removed the entire part about Side correction in the ShoulderCamera module and I could set the x axis to 0. Only downside is you cant have side correction, if you are not in first person the camera can go through the walls.

part to remove (its at about line 430):

-- Handle occlusion
	local occlusionDistance = self.currentCamera:GetLargestCutoffDistance(self.raycastIgnoreList)
	if occlusionDistance > 1e-5 then
		occlusionDistance = occlusionDistance + collisionRadius
	end
	if occlusionDistance >= self.lastOcclusionDistance then -- make it easy for the camera to pop in towards the player
		if self.curOcclusionTween ~= nil then
			self.curOcclusionTween:Cancel()
			self.curOcclusionTween = nil
		end
		if currentTime > self.lastOcclusionReachedTime + self.timeUntilZoomOut and self.lastOcclusionDistance ~= 0 then
			self.timeUntilZoomOut = self.defaultTimeUntilZoomOut * 2 -- double time until zoom out if popping in repeatedly
		elseif self.lastOcclusionDistance == 0  and self.timeUntilZoomOut ~= self.defaultTimeUntilZoomOut then
			self.timeUntilZoomOut = self.defaultTimeUntilZoomOut
		end

		if occlusionDistance / self.normalOffset.Z > 0.8 and self.timeLastPoppedWayIn == 0 then
			self.timeLastPoppedWayIn = currentTime
		end

		self.lastOcclusionDistance = occlusionDistance
		self.lastOcclusionReachedTime = currentTime
		self.isZoomingOut = false
	else -- make it hard/slow for camera to zoom out
		self.isZoomingOut = true
		if occlusionDistance > self.lastOcclusionDistance - 2 and occlusionDistance ~= 0 then -- reset timer if occlusion significantly increased since last frame
			self.lastOcclusionReachedTime = currentTime
		end

		-- If occlusion pops camera in to almost first person for a short time, pop out instantly
		if currentTime < self.timeLastPoppedWayIn + self.defaultTimeUntilZoomOut and self.lastOcclusionDistance / self.normalOffset.Z > 0.8 then
			self.lastOcclusionDistance = occlusionDistance
			self.lastOcclusionReachedTime = currentTime
			self.isZoomingOut = false
		elseif currentTime >= self.timeLastPoppedWayIn + self.defaultTimeUntilZoomOut and self.timeLastPoppedWayIn ~= 0 then
			self.timeLastPoppedWayIn = 0
		end
	end

	--Update occlusion amount if timeout time has passed
	if currentTime >= self.lastOcclusionReachedTime + self.timeUntilZoomOut and not self.zoomState then
		if self.curOcclusionTween == nil then
			self.occlusionTweenObject.Value = self.lastOcclusionDistance
			local tweenInfo = TweenInfo.new(self.tweenOutTime)
			local goal = {}
			goal.Value = self.lastOcclusionDistance - self.normalOffset.Z
			self.curOcclusionTween = TweenService:Create(self.occlusionTweenObject, tweenInfo, goal)
			self.curOcclusionTween:Play()
		end
	end

2 Likes

hmm interesting, i will try this

1 Like

line 430 its empty bro

blablablablabla

1 Like

It’s in the module called Shoulder camera btw I tried on mobile if you aim close to the wall your camera will go through.

1 Like