Friction using multiplication

by sheeptester
See Code Download Embed
Each is given an initial velocity of 40, but one's velocity is multiplied by 0.8 every frame, while the other is multiplied by 0.07 every frame.

You can change the values in the project yourself to experiment.

To use this for a JavaScript game, you'll need to convert the velocity unit from pixels per Scratch frame (30 fps) to three.js units per screen frame (usualy 60 fps) using dimensional analysis.

For Gamepro5

Created October 12, 2019

Last updated October 12, 2019

Published October 12, 2019