I just recently got picking working using the Bullet Physics Engine. Picking is a way to “pick” an object via a primitive (triangle) using a cursor from the camera’s perspective. Hovering your mouse cursor for example of a window and clicking on an object is a very intuitive way to interact with a scene. However, it’s not as intuitive to program, because the location selected is in 2D screen coordinates, and not 3D world coordinates. The difficulty in picking really lies in somehow determining the 3D coordinate space of the object to select. First, lets see what I’m talking about.
Just a short and sweet post on the progress of my game. This demo shows off basic character and camera controls, as well as interaction with the world. You can toggle gravity using ‘g’, as well as the forces that cause the particles to flock to various shapes using ‘c’. The player moves using standard wasd keys, with ‘q’ and ‘e’ moving the character forward and backward. Holding the left mouse button will fire small “bullets” while clicking the right mouse button will fire larger “bullets”. The player moves within a bounded plane. The statistics display has also been updated to show relevant graphics and physics information.
You can download the executable here: tech_demo_1.zip
Note that you will need to install the June 2010 DirectX and the Visual C++ 2010 runtimes if this is your first time running the software. These should not need to be installed again to run any of my future demos, unless otherwise noted.
It only took two weeks, but I sorted out (almost) all the kinks with bullet physics. Check it out:
I just wanted to post a quick sneak peek of what I’ve been working on this past week: integrating bullet physics. Below is just a test, it doesn’t use the full particle system yet (so the framerate suffers greatly due to the naive method used for drawing cubes).
Check out the physics library here: http://bulletphysics.org
© 2019 Halogenica | Stumblr by Eleven Themes