there are various way to approach this. The easiest one would be to play a footstep sound whenever the camera has been moved. Here’s how to check for that in Blockly:
Show Blockly example
In the update-loop block, we create a “lastPosition” variable and assign the last position of the camera to it. Whenever we notice that the current camera position is not the same as the one we saved last, we play a footstep sound effect.
In this example, I generate a random number to add some variation to the sound effects, too!
Here’s a CoBlocks implementation:
Show CoBlocks example
In this example we nest a “forever” block under the “run separately” block, which will behave just as the “on update” block in Blockly.
Here are the examples in action!