Thursday, September 5, 2013

Secondary Weapon, Burnable Houses, and more added to Bombshell Betsy v0.2



New features! You can now press (B) or Joystick Button (2) to drop bombs. Buildings can only be destroyed by them and will start to burn when you drop one close enough:

Vaclav also added some sweet textures to the buildings so fly in close to check em out:

Non-Oculus support has also been added. The game will start in Oculus mode but you can press (T) to toggle between them.

It seems silly but implementing this initially gave me some trouble. There's 2 cameras, the default Main Camera and an instance of OVRCameraController. My toggle code looks like:

But this gave me the error "There are 2 audio listeners in the scene. Please ensure there is always exactly one audio listener in the scene."

To fix this I removed the audio listeners from Main Camera and OVRCameraController, and created a blank GameObject at the cockpit position with a single AudioListener attached. That object has a variable LookTarget which changes based on what camera is active, and sets the same rotation in Update(). This preserves the 3D sound effects.

I hope people enjoy this. It's a real blast with the joystick + oculus combination :)

1 comment: