I’m trying to make procedurally generated viewmodel bobbing whilst walking & movement sway based on MouseDelta in a similar fashion to “Michael’s Zombies”, however am unsure how to do so. Reading other posts I have seen mentions of springs, but don’t understand what is meant by them.
Currently my viewmodel is simply placed in front of the camera based on an offset by a RenderStepped function shown below:
function tools:update()
if self.viewmodel then
local finalOffset = self.viewmodel.offsets.idle.Value
if self.settings.toolType == "Gun" then
finalOffset = finalOffset:lerp(self.viewmodel.offsets.aim.Value,self.lerpValues.aim.Value)
end
self.viewmodel.rootPart.CFrame = self.camera.CFrame:ToWorldSpace(finalOffset)
end
end
Sadly i have a limited knowledge of working with CFrames, and therefore have found it difficult to find a way to achieve this.