I have a lock on system for a fighting game, where if you aim the mouse at another player/character your camera will change and you will be locked on, and the camera will follow them. The issue is that I cannot apply good camera shaking modules while your locked on, as when your locked on the camera is staying there instead. I use body positioning for my lock on camera, and I have tried to use a cframing method of keeping my camera around me but it failed. Any ideas on how to make a lock-on camera able to camera shake? (Not using humanoid camera pos)
1 Like
How are you “locking” it to the character?
2 Likes
Sorry for the late reply, but as I said the camera CFrame is looking at the other person, while I use a body position so it follows to the right of my character
Does anyone else have any idea to what could help?
I have the same problem, did you get any answers?
Hey, I’ve had this problem as well. But I found out a way! If you use EZ camera shaker, then create a cframe value under your lock on script. And just make the CameraShaker.new() function look like this:
local CamOffsetValue = your cframe value
local camShake = CameraShaker.new(Enum.RenderPriority.Camera.Value,function(shakeCFrame)
workspace.Camera.CFrame = workspace.Camera.CFrame * shakeCFrame
CamOffsetValue.Value = shakeCFrame
end)
And remember the run service connection that sets camera cframe every render stepped while lock on? Put this there:
local CamOffsetValue = your cframe value
Camera.CFrame = Your cframe calculation * CamOffsetValue.Value