This problem involves me using this code to pick a spot on the terrain to place a "connector" point for a road. on flat areas this code works as intended...if I try to do it on a slope, the connector dot doesn't end up where I clicked on the terrain, the dot usually hovers above the terrain.
UpdateMouseStats()
if pick object(mx, my,10,10) = 10 `set the first road connector location
tempmousex = (get pick vector x() + camera position x(0))
tempmousey = (get pick vector y() + camera position y(0))
tempmousez = (get pick vector z() + camera position z(0))
TransitConnector(ooxx).XPos = tempmousex
TransitConnector(ooxx).YPos = tempmousey
TransitConnector(ooxx).ZPos = tempmousez
TransitConnector(ooxx).ConnectorID = ooxx
position object 7, tempmousex, tempmousey, tempmousez
show object 7
pstate = 1
point2set = 1
endif
I tried to use double floats with my variables but still no good......kaedroho you're probably the only one who could shed light on this. What do you think?
Home is where my souped-up computer is...
