Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Another pick object and blitzwerks issue

Author
Message
JoeOh
17
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 1st Dec 2012 16:57 Edited at: 1st Dec 2012 16:58
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.



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...
Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 2nd Dec 2012 11:14
if it is only the y axis that is off you could use the bt getgroundheight (terrain, x, y) command to find the right spot. for my bt placement editor's I use an object for my mouse cursor as I have trouble with the 2d to 3d mouse stuff.

JoeOh
17
Years of Service
User Offline
Joined: 25th Feb 2009
Location:
Posted: 3rd Dec 2012 09:12
Kezzla, I did what you suggested, now the mouse get's it right heightwise where ever I click on the terrain. Now if the camera is at a top down viewing angle, the x/z position is pretty much dead on, but if I move the camera's viewing angle around that point where I click, where I click and where the node get's actually placed is off, until my camera angle is back to perpendicular with the terrain.

Is there a command I am forgetting to update or something?

Home is where my souped-up computer is...
Kezzla
17
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 5th Dec 2012 03:40
I'm not sure, I can only guess, but I used to have similar issues when I tried to use the get 3d position from mouse co-ords command. It would behave strangly in a similar manner to yours, that is why when I am making a placement editor I use a sphere locked to the blitzterrain, i then use the mouse movement to move it around the terrain and then place things at that objects position. it works the same as a mouse cursor.

sorry I cannot be of more help.

maybe someone else better with 2d to 3d co-ordinate skills can chime in here

Login to post a reply

Server time is: 2026-07-09 02:35:21
Your offset time is: 2026-07-09 02:35:21