Bullet Physics 3D Block Toy
|
A simple 3D toy using Bullet Physics consisting of various things that you can knock over by throwing soccer balls at them. With enough patience and perseverance you can push everything off the edge of the world. Shapes and models are rendered using GeometricPrimitive
and Model
from DirectXTK12. The models are input using the built-in function Model::CreateFromSDKMESH
which requires that the models be in SDKMESH format. The 3D models are from free3d.com and were converted from OBJ format using DirectXMesh
. The logo on the small crate has been changed to the logo for the Laboratory for Recreational Computing.
This toy can be played with either the keypad or an XBOX controller.
F1 | Help (this document) | |
Space | Right button | Throw a ball along the view vector. |
Arrow keys | Right stick | Camera orientation. |
WASD | Dpad | Camera motion (relative to the view vector). |
Backspace | A | Reset to initial conditions. |
PrtScr (hold down) | Save screenshot to a PNG file |
This code uses the LARC Engine and is part of the LARC Code Base.
Model
, but there seems to be no local copy. I can either override the DirectXTK12 function that loads from an sdkmesh
or bite the bullet and write an obj
file loader (saving a local copy of the vertex buffer in either).obj
file reader might be a good idea anyway. While you might prefer to shop a game with models in sdkmesh
format, it might be better if we could use obj
s in class.gamesettings.xml
along with the other settings instead. Derive a class from CSettings
and write the code for this.