Inspiration

TikTok dances were (are?) a thing, but I'm no good at dancing. Rather than rely on raw dance skill, I wanted to create a lens that placed some constraints on the user (hand positions and timing) but still gave them the freedom to choose their own song and move how they wished. I wanted to leave it open-ended enough for users to experiment with.

What it does

This lens tracks the user's hands and awards a point each time the hands simultaneously hit the targets. After scoring a point, the targets are randomly placed somewhere else. There is a time limit that also resets when a point is scored, but to keep things interesting the time goes down the more points you have. Once you get to 20 points you need to be moving pretty quick, and at 30 things become downright crazy.

How we built it

Most of the lens was created via JavaScript. I have the body tracking, the image targets, the success animations, the timer, and the score as objects in the scene, but all the game logic is controlled via two scripts.

Challenges we ran into

There weren't any major challenges with this lens. All the necessary tooling is already built-in to Lens Studio. The trickiest part was letting the user restart the game without them having to leave the lens and come back, but nothing a little elbow grease couldn't solve.

Accomplishments that we're proud of

I really liked getting the timer bars on the side working. I created them with the material editor the only outside resource I needed for them was a colormap image to get the green-yellow-red transition working (although I could probably do that all in the material editor as well).

What we learned

I did learn a bit more about what can be done with the material editor and some of the limits of how much interaction a user can process at a time. Originally I started building this out with hand and foot tracking in mind, but that started to get a bit overwhelming. There's a fine line between not enough user interaction and too much user interaction; I think I found a good balance between the two.

What's next for Arms of Fury

Initially I thought about tracking the feet or knees as well, but that seemed like a bit much for the user to keep track of. But I have some other ideas involving full body tracking...

Built With

  • lensstudio
Share this project:

Updates