https://editor.p5js.org/YuhongSun/sketches/b5A8V17R9

https://editor.p5js.org/YuhongSun/sketches/w2GJ98R6e

I initially wanted to train a dynamic body model, but after obtaining the skeleton in the video, I didn't know how to train it. So I use each point instead of a continuous model, so the effect is not particularly good in the end. I successfully changed the ml5 train model example handPose to bodyPose. I encounter a lot of problem like WEBGL position, WEBGL fonts error, and WebGPU CPU error but all solved. Then I use this model to control my game. In this version, the model is not affected by the background and am more precise than the pervious version.
An example of playing the game:
https://drive.google.com/file/d/1N3dEefwjy8wXwFIl6YTi-sBDnXMwZY5N/view?usp=share_link