Fix for missing terrain brush when "tiled" is turned off
by Matt Fairfax · in Torque Game Engine · 06/09/2007 (5:36 pm) · 2 replies
Whenever you disable/uncheck "tiled" on a TerrainBlock you can no longer use the TerrainEditor to make changes to it.
It turns out that this is because of a *long* standing bug in TerrainEditor::collide() where it was using the wrong transform.
To fix this go into editor\terrainEditor.cc and find bool TerrainEditor::collide() and change this code:
to
This should fix you right up and allow you to edit the terrain when the tiling is off.
It turns out that this is because of a *long* standing bug in TerrainEditor::collide() where it was using the wrong transform.
To fix this go into editor\terrainEditor.cc and find bool TerrainEditor::collide() and change this code:
mTerrainBlock->getTransform().mulP(startPnt, &tStartPnt); mTerrainBlock->getTransform().mulP(endPnt, &tEndPnt);
to
mTerrainBlock->getWorldTransform().mulP(startPnt, &tStartPnt); mTerrainBlock->getWorldTransform().mulP(endPnt, &tEndPnt);
This should fix you right up and allow you to edit the terrain when the tiling is off.
About the author
I am a Game Designer at PopCap who has worked on PvZ Adventures, PvZ2, Peggle Blast, and Bejeweled Skies. I am an ex-GarageGames employee who helped ship TGE, TGEA, Torque 3D, and Constructor.
Torque Owner Stefan Lundmark