Draw Your Sword

March ’22 || Unity C# Computer Graphics

Matthew L. Komar
2 min readJan 4, 2023

A two-player VR passthrough game combining art and martial arts: draw your stick and hit somebody with it.

I created a component that would draw polygons in Unity along a path the player would draw.

About the game

We thought it would be cool to use the Quest’s passthrough AR to create a colocation game for several reasons:

  • Recontextualize imaginary play fighting.
  • Not many accessible VR games take advantage of multiple players physically next to each other.
  • VR drawing apps do not let users move their creations around.

When players connect to each other, they calibrate their headsets to be in the same coordinate space, then they draw their own sticks and try to tap the other on the head.

If you’d like to read more about our journey check our Devpost blog post!

Draw Your Mesh

I’ve always wanted to learn how to create procedural meshes for my games and this project was a perfect opportunity to learn how to do it!

Unity and Unreal use a pretty similar back end for creating meshes:

  1. Create an array of vertices
  2. An array of triangles
  3. Create an array that has the normal direction of these triangles
  4. Pass these into a function and it creates a mesh!

I created a component that would create vertices and triangles by sampling points along a spline that was created by the player during run time. Then I created colliders for the mesh.

--

--

No responses yet