Game Development Community

dev|Pro Game Development Curriculum

Adding Move Up and Down to the Free Camera in the Mission Editor

by Pisal Setthawong · 11/13/2006 (4:45 pm) · 3 comments

I was talking with an friend who was an architecture/3D artist who asked me when he saw the World Editor why was it so difficult to use. I know that the side, front, top view is better suited for people with background in this field, somehow after a series of discussions, one of the things that slipped out was, why didn't the camera in the free camera mode allow to move up or down. Strangely enough, there was no up and down, and it couldn't move in relative to the height (z axis in TGE or y axis in the typical coordinate system). Hmm... So I just made a simple change to allow that to happen.

I made z go down and q go up.

Editted the creator/editor/editor.bind.cs and added the following code:

//Add binding for moving in 6 degrees of freedom in editing mode
EditorMap.bindCmd(keyboard, "q", "moveup(1);","moveup(0);");
EditorMap.bindCmd(keyboard, "z", "movedown(1);","movedown(0);");
WorldEditorMap.bindCmd(keyboard, "q", "moveup(1);","moveup(0);");
WorldEditorMap.bindCmd(keyboard, "z", "movedown(1);","movedown(0);");
TerrainEditorMap.bindCmd(keyboard, "q", "moveup(1);","moveup(0);");
TerrainEditorMap.bindCmd(keyboard, "z", "movedown(1);","movedown(0);");
AIEditorMap.bindCmd(keyboard, "q", "moveup(1);","moveup(0);");
AIEditorMap.bindCmd(keyboard, "z", "movedown(1);","movedown(0);");

If the control object is not using a flying object, then there is no need to check as ground objects cannot move up.

If in the free camera mode, we can easily move up and down relative to the camera. This is a simple modification could help make the World Creator easier to use.

About the author

An Educator moonlighting as the Technical Lead at the indie game development studio called Flying Pig Game Studio


#1
11/22/2006 (4:15 pm)
I think all the above should read .bindCmd otherwise you get error. Generally an excellent idea and improves the ease of use of the editor. Would still be nice if we had some kind of 4 view.
#2
11/23/2006 (6:21 pm)
Thanks for the correction. Seems that I made a mistake about the copy and paste stuff.

Anyway, I do agree about the Top/Front/Side view. I'm not sure if anyone is working on that on the world editor, but if I got the free time after my latest project, I think I am planning to try to do that.
#3
01/14/2007 (5:55 am)
Excellent. This should have been in the editor from the start. Thanks for the information.