• Steven Doughty

Interface Lab : A One Button Interface "Ardity Quakes"

My one button interface consists of a simple push button Arduino circuit communicating to Unity through the Ardity package. Inside Unity I modeled, what I imagine to be, a make-shift construction work site. The environment includes a few metal barrels, a bench, and a roof of wooden beams. When the button connected to the Arduino is pressed the ground begins to shake. The longer the button is held down the more violent the shaking becomes, until all the items fall over/down or are otherwise comically launched into the air. I was inspired to create this scene by some generally clumsy control over the camera I was having when I first started the Unity tutorial videos.

I made the environment by using the Unity terrain tool to create the cave walls and floor. Then using the create 3d object I drew each of the other elements. Once all the elements where created, textured and placed I applied the rigid body component to each Gameobject. With the scene complete I began work on the button listener and script to control the movement. The script transforms the terrain object in the Y direction sin wave equation, the amplitude of which increase incremental with every frame the button is held down. Reverting to zero when the button is released.

I would say that other than being a little rusty with my wave equations and endlessly fine tuning the perfect wave-length and amplitude. The process felt fairly straight-forward with a clear workflow. A few technical issues I did encounter included using gravity and not kinematics for the terrain object, causing my world to fall endlessly into the void. Using Time.deltatime as my time variable, which produced really extreme results. As well as a comedy of errors involving syntax. Future iterations would be to add a potentiometer to control the frequency, add more dynamic objects in the environment, and make sure that the camera position makes sense even in the extreme cases. In the end I am please with the challenge, progress, and outcome of the whole experience.

Without further ado...

37 views0 comments

Recent Posts

See All