-
I want to move the player’s camera without using runservice
-
Previously using runservice was fine and this line of code worked for rotating the camera
cam.CFrame*=CFrame.Angles(heat,0,0)
I used this to add gun recoil every frame and it worked fine
but I later introduced a script that keeps the camera relative to the root part’s orientation rather than the world’s y axis as shown in the video, this is meant to be used while inside a vehicle on rough terrain
the problem is now the original recoil line seems to be almost ignored
- I tried using different events of runservice like prerender, heartbeat etc
I tried adding rotation to the camera script itself which does add recoil seemingly properly at first but it is more like it is adding an offset so when the “heat” value goes back down to zero so does the camera. Originally it left the camera facing upwards if the player did not pull down on the mouse. I can still move my mouse up and down like normal however so there must be a value somewhere in the default code of roblox that I should be able to add to in order to rotate the camera by that amount but after looking I havent been able to find the right line. I dont want to add an offset to the camera, instead I want to rotate it as if the player had done so.
If anyone would happen to know where the default camera controls are relative to the mouse input that should be all I need