Making a 3D version of Conway's Game of Life, can't make a "cross-hairs"

Started by hunt210, May 02, 2014, 08:26:14 AM

Previous topic - Next topic

hunt210

The basic idea I have is to make a tiny Primitive sphere that follows the location of the camera at all times.  I only want this in the game so that the user can always tell where they are adding/removing cells.  I know in my gut that the solution is simple but I've been banging my head against this issue for hours now

EgonOlsen

You can get the camera's position in world space from the camera. Then get the current view direction via camera.getBack().getZAxis(). Multiply that with some value (10,20,...40...) and add it to the position. Try to use that as the new position of your sphere (sphere.clearTranslation(); sphere.translate(<newPosition>);)