P0-P-172: Part 79: Oculus Touch Roomscale VR Demo: Guns, and Cloth Simulation
by PhoenixGames on Jan.01, 2017, under Art and Designs, P-0, Software and Games, Spiritus Astrum
I have added guns to the VR demo. The hardest part was making the guns fit into the hands properly, actually getting them to fire was quite easy.
I also fixed some issues with the guns, such as spend cases not being ejected properly, and odd lighting issues on the muzzle flash texture at certain angles. The player can only fire one gun for now, I am not sure if I want to add support to fire two guns at once, since I am not really building a shooter game, so it is unlikely the player would need to fire two guns at once.
The game can now be played either with a VR headset and controller, or with a conventional mouse and keyboard.
Unity has a built in cloth simulation system, which is very easy to use. I was able to use it to create some banners with very realistic movement, physics, and collision. The only downsides are that the simulation is very expensive performance wise, and the mesh used for the banner needs to be relatively high poly, so having many cloth objects in a scene would rapidly lead to performance problems.