Okay... I got it to work... but now I have a new problem...
This inside of a EVEN_MOUSEDOWN
th ideea is that when I click on a plane the vertices that are in a set amount of distance move down or up... I ckeck for every vertice the distance between it and the pickedx,y,z... the vertices do move up or down... but in some cases some vertices that are at a bigger distance and at the margin of the plane(important) also move up or down
If rise = 1 Or low = 1 'DebugStop Local pick:Tentity = CameraPick(cam.cam,EventX(),EventY()) If Not pick = 0 Local px:Float = PickedX() Local py:Float = PickedY() Local pz:Float = PickedZ() Local pnx:Float = PickedNX() Local pny:Float = PickedNY() Local pnz:Float = PickedNZ() Local ptriangle:Int = PickedTriangle() Local psurface:Tsurface = PickedSurface() Local pentity:tentity = PickedEntity() Local p1:Tpivot = CreatePivot() PositionEntity(p1,px,py,pz) Local p2:Tpivot = CreatePivot() For Local i:Int = 1 To psurface.no_verts Local vx:Float = VertexX(psurface,i) Local vy:Float = VertexY(psurface,i) Local vz:Float = VertexZ(psurface,i) PositionEntity(p2,vx,vy,vz) Local dist:Float = EntityDistance(p1,p2) If dist <= Float(GadgetText(ModifyTerrainWnd_TextField_Amount)) If low = 1 MoveVertex(psurface,i,0,-0.1,0) ElseIf rise = 1 MoveVertex(psurface,i,0,0.1,0) EndIf EndIf Next EndIf EndIf
This inside of a EVEN_MOUSEDOWN
th ideea is that when I click on a plane the vertices that are in a set amount of distance move down or up... I ckeck for every vertice the distance between it and the pickedx,y,z... the vertices do move up or down... but in some cases some vertices that are at a bigger distance and at the margin of the plane(important) also move up or down