I recall there was a really cool script somewhere… and unfortunately I lost my copy a couple of months ago.
The script detected whether the player was performing a nod or head shake with the camera.
Does anyone have an example on how to tackle this or still have a copy of the script in question?
Well, in theory, you need a recording device that is sampling camera movement over time, but only does so for the last n seconds, overwriting anything older. It is capable of tracking two things on the fly: 1) the accumulated (absolute) delta movement per axis, and 2) the point average (to differentiate legit turning from moving around the same directional vector).
The shake (or nod, which is when you exclude one axis) is registered when the average doesn’t move over some threshold, while the accumulated delta is high, but obviously you need to tweak the three variables: 1) the time interval, 2) the delta threshold, and 3) the average tolerance, to make this work.
Collect a small list of camera floats Y and Z, And check its contents for the desired wav length pattern to emerge. Or for the contents to contain both max and min of the desired wave length.