Cool! Nice to see some 3D scripts passing around. I'm not that good yet at programming (in Godot), so this is welcome.
But how do I implement your script? Because I already have a camera script attached to my camera, to follow the car dynamically (base-script by Bastiaan Olij tutorial).
Since you can't attacht 2 scripts to 1 node, do I just copy your script and paste it with what I already have?
The function _process() doesn't kick in untill you use the function shake() somewhere, right?
Edit: maybe I found it. Is it possible that instead of using extends Camera I could use extends "res:://path/to/mainScriptCamera.gd" ??
Edit 2: still can't seem to get this to work. First edit doesn't work I guess, since the script then becomes the child of the script and I'm not able to call a function of that child (or maybe I'm doing it wrong?).
Now tried it with
var camExtScript = preload("res://Scripts/cam_Shake.gd").new()
in the main camera script at the top (set the shake script back to extends Camera) and then trying to call the function when boosting is true
currentFOV = boostFOV
currentFOV = maxFOV
I'm also changing the FOV when the car is boosting. But can't get the cam to shake.