2017-02-24
[public] 25.1K views, 702 likes, 10.0 dislikes audio only
In this video we create a simple camera shake system, with several parameters to control the appearance of the shake.
NOTE: There've been some criticisms about the shake looking a bit "off", mostly due to the camera not slowing down towards the end. I have added an update to the source code to try and address this. The change is simple: the "speed" variable has been replaced with a maxSpeed and a minSpeed variable. The current speed of the shake is then determined by interpolating between these two values based on the damping curve. This change does make the "duration" variable less precise, but hopefully that isn't too great a concern.
The project is available here:
https://github.com/SebLague/Camera-Shake
If you'd like to support these videos, you can make a recurring monthly donation (cancellable at any time) through Patreon: http://bit.ly/sebPatreon
Or a once-off donation through PayPal:
http://bit.ly/SupportGamedevTutorials