easy 3d positioning: help and ideas needed

Blitz3D Forums/Blitz3D Beginners Area/easy 3d positioning: help and ideas needed

BerndWill(Posted 2005) [#1]
Hello,

in my tactical 3d space game, I want to position my space ships by ordering them with a mouse click. On 2D tile maps, it is easy to move and position an object (e.g. left click to select and right click to order the unit to a new position).

But how can I truly position objects in 3d space ? Using a mini map always reduces positioning to 2d (therefore I guess many 3d games are kind of 2d tile positionings).
Do you know any examples for left click / right click positioning in 3d ? Do you have any (also non Blitz3D example of how to coordinate and position movements in 3d space) ?

Thanks for tips
Bernd


jfk EO-11110(Posted 2005) [#2]
you can use Camerapick with the mouse coords to select something. The Mesh must be pickable (see entitypickmode).

positioning in 3d is about the same as in 2D, tho with one more dimension. There are diffrent ways to define the third dimension. It is also up to your design to define what's the third dimension at all, depth or height or width.

you could use mouseX and -Y for X and y and the mousewheel for Z.

you could position a plane at these coordinates, an insisible one (entitalpha zero) that is pickable. after selecting a spaceship you turn all ships pickmodes off, then use the plane to determine the current picked location and position the spaceship right there. This will look as if you move the spaceship with the mouse, plus the mousewheel would move it away in Z-direction.

But as I said, there are many ways, and maybe you'll come up with something absolutely new and amazing.


BerndWill(Posted 2005) [#3]
using the mousewheel is a very good suggestion !!

thanks, Bernd


jfk EO-11110(Posted 2005) [#4]
keep in mind that not all mouses have such a wheel, and even if they have one, it's not always configured to work correctly. So maybe you should offer an additional key-pair to emulate the Wheel.


Shifty Geezer(Posted 2005) [#5]
Offer keyboard modifier keys. Click object with mouse to select it, use mouse X and Y to move relative to the current screen, and then use maybe Shift and mouse Y for forwards/backwards movement, CTRL for move object in ITS X direction, and Alt for moving in ITS Y direction, kinda thing.