Game Development Community

How to move Terrain datablock

by Thanhda Tie · in Torque Game Engine · 01/27/2007 (11:06 pm) · 3 replies

Okay. can anyone answer me. how to i move or position my terrain datablock. i tried modifying the position. but it did me no good. i currently have 2 terrain data blocks. and trying to move it over to the side. so i can increase the size of my world. anyone know how to do this?

#1
01/28/2007 (3:21 am)
This can not be done as standard with TGE. (TGEA can do this with Atlas) For was a resource though for TGE years ago. Can't find it now.
#3
01/28/2007 (9:58 am)
I'll probably kick myself for providing this solution, but there is a way to do what you want T Squared. And it only requires 2 script changes.

*WARNING* - There is NO reason to do this, but I hate an unanswered code question

In example\creator\editor\EditorGui.cs, find this code section:
function WorldEditor::init(%this)
{
   [b]// add objclasses which we do not want to collide with
   %this.ignoreObjClass(TerrainBlock, Sky, AIObjective);[/b]

   // editing modes
   %this.numEditModes = 3;
   %this.editMode[0]    = "move";
   %this.editMode[1]    = "rotate";
   %this.editMode[2]    = "scale";

//... Rest of function

Remove TerrainBlock from the ignoreObjClass parameter list.

Next, open the mission that has the terrain you want to move, and remove the "locked" parameter from its modifiers.

Now, you should be able to move the terrain around in the WorldEditor... I did this on accident once, and I nearly gave myself motion sickness rotating and translating the terrain...it's very disorienting.