this is now my status:
GameConnection* connection = GameConnection::getConnectionToServer();
Player* playerObject = dynamic_cast< Player* >(connection->getControlObject());
Point3F pos = playerObject->getPosition();
// Fetch the terrain with a ray-trace.
TerrainBlock *terrain = TerrainEditor::getTerrainUnderWorldPoint(Point3F(pos));
F32 squareSize = terrain->getSquareSize();
gp.terrainBlock = terrain;
// Z-coordinate is not used
gp.gridPos = gp.terrainBlock->getGridPos(Point3F(pos));
// If grid is already set to our material, or it is an
// empty grid spot, then skip painting.
S32 mat = 1;
inf.mMaterialChanged = true;
// Painting is really simple now... set the one mat index.
inf.mMaterial = mat;
it should work but i cannot run the Method mow - i have done this already after the method:
DefineEngineMethod(TerrainEditor, mow, void, (), ,"")
i try to run the following command in TorqueScript:
and already added the method in the terrainEditor.h:
so it seems that the function "mow" couldnt run of course there is NOT an Syntax error because it runs without any errors ... but i dont know fruther
Would be nice if you could help - thx!