View on GitHub

FPS0

A ThreeJS/physics experiment, with first person controls and minimal collision detection

Download this project as a .zip file Download this project as a tar.gz file

A minimal First Person Scenery with a Blender level and dynamic content

The goal of this project was to explore the options for a simple game with first person controls that runs completely in a browser. To achieve this I wanted to be able to

Luckily, all of the ground work was already done by someone else. :-)

Basically this demo merges the Blender scene loader of mrdoobs ThreeJS library and the CannonJS FPS example by schteppe.

I added the idea that the imported Blender geometry gets turned into a static model in the physics engine by finding the cubes and adding invisible physical collision boxes to their position.

This worked surprisingly well and gives some sort of minimal FP(S) - completely running in the browser. The imported Blender model is turned into a static model by adding the boxes as static physic objects. This way this you can 'walk' on the objects of the Blender model (the grey objects in the screenshot).

Some information

To play around with it simply download the files by clicking the links above. For more information checkout the repository here.

Here's the live example.

Here's a screenshot.

And this is the scene in Blender.

Video

If you don't have access to a webgl enabled browser - here's a video of FPS0 in action.