Fixed particle code and added adjustable motion sensitivity.