I’m attempting to implement a system in a space RTS game where the player can order units to a three dimensional location with the mouse. They select the plane coodrdinates by clicking and holding, then press shift to select the elevation. I have included an image that demonstrates this system in Homeworld. [38682-3d+movement+example.png|38682]
I know how to use the mouse for movement orders on a 2D plane, but how do I add the ability to select elevation?
Additional info: I’m using C#. The game utilizes a player controlled free camera.
The image you linked gives you a perfect description of what you need to do.
Check if the player is holding shift, if they are capture the current mouse position, increase or decrease the next move orders height location based upon the distance the user moves the mouse away from the origin.
When the move order is given, the distance away from the origin the mouse moved is your height elevation for that move order. A lower value from the origin will mean a decrease in height elevation and an increase from the origin will mean an increase in height elevation for that move order.
Does this answer your question?