Select 3d objects with the mouse
Blitz3D Forums/Blitz3D Programming/Select 3d objects with the mouse
| ||
I'm working on a puzzle game that involves a cube formed of multiple cubes itself (i.e. rubik's cube). I want users to be able to highlight an individual cube by clicking on it. The only way I was able to implement this is by projecting a small object from where the mouse is at the moment of the click over the z-axis until I detect a collision with a cube. It works fine, but the problem is the perspective. Since the projection is on the z-axis, the highlighted cube isn't always directly where the cursor is, because of the perspective. Anyone has a better way to do this? Thanks. |
| ||
Make the cube pickable with EntityPickMode then pick it with CameraPick. Steven. |
| ||
Works perfect! thanks a lot! |