Zelimir Fedoran
email zelimir.fedoran@gmail.com

Voxel Picking

Posted on
May 26th, 2010
Tags
, ,

This is a fairly simple update but it is an important step towards being able to “poke holes into a mountain“. I have a few more important decisions to make before I can start working on fully destructible environments.

Traditionally picking or selecting an object in 3d space is not a trivial task and requires unprojecting a ray from the 2d mouse position so that it can be used to check for collisions against objects drawn to the screen. As I did in the bubble bound 2 in-game editor. However, the grid like nature of this project allows me to cheat. I can check for voxels by simply rounding the positions in front of the camera to the nearest integer.

0123