I am trying to add motion blur to my game. It is a first person game and I want it so when you look around it will blur with the recent frames. I saw the other tutorial but It was not first person and it constantly blurred. Can anybody help?
There’s a version of what you are after that could probably be made to work easily enough:
playcanvas:master
← leonidaspir:PP-MotionBlur
opened 07:17PM - 20 May 21 UTC
A simple camera based motion blur post effect. It calculates the pixel velocity … based on the current/previous world positions derived from depth.
It's still WIP, main issue being on extreme changes of direction some glitches can be observed from time to time. That happens most likely when one of the two world positions are off screen between frames, though I may be wrong on this. A fix is pending on this, ideas are welcome.
A temp `post-effects-private.html` example has been added to this PR for development and testing. An orbiting camera has been enabled to provide camera movement.

I confirm I have read the [contributing guidelines](https://github.com/playcanvas/engine/blob/master/.github/CONTRIBUTING.md) and signed the [Contributor License Agreement](https://docs.google.com/a/playcanvas.com/forms/d/1Ih69zQfJG-QDLIEpHr6CsaAs6fPORNOVnMv5nuo0cjk/viewform).
Do you know where I can find the code for this? lol!
So do I just put this script on the camera?