Peter Swanson

Software Engineer

Full Stack Web Developer


The Code


This script allows a virtual gun to fire a bullet while held by an HTC VIVE controller.


The user can fire the gun by pulling the controller's trigger.


The gun spawns a bullet object at a velocity that can be modified in the Unity engine.




Shoot.cs - Fire a gun with sound and particle effects