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.

Newcomers DBPro Corner / Elevated 3d object linking?

Author
Message
Daryn Alsup
16
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 19th Jul 2008 08:06
For the past month or so, (very small in programmer years ) I have been trying with too much over exertion to figure out how to link an object (Lets just say on a 2X2 meter tile- on 2048X2048 terrain-) that sits 15 meters above the ground and is 2X2 meters across. What I need to have happen is, the user clicks a tile and my elevated Highway will be placed on the map. But I need the verticies to line up and be able to cap the beginning and end of the highway with a start cap and end cap. How do I continually place an object linked to the previous one and apply an end and start cap RELATIVE to the N,S,E,W, Direction the verticies of the highway model after it's drawn?

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 19th Jul 2008 16:04
I don't think I'm understanding here... Are you asking how to get the coordinates of a tile on your terrain?

Daryn Alsup
16
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 20th Jul 2008 09:20
Here's what I mean... I have an object. How do I determine the tile (or location... I can determine tile placement at a later date) being clicked IN 3D space? I also need my object to link together like a spline... so it would first place a start cap (an object I made) the repeating object (Like my el. Highway) and an end cap (for when you've placed all that you've desired)

Now I know very well about pick object and so on. But I've also figured a bit of code out that can position objects relative to the screen size... or in other words:

(Note I am really using terrains with a matrix overlayed for a grid)
X=Matrix Position X(1)
Y=Matrix position Y(1)
Z=Matrix position Z(1)
X=MOUSEX()
Z=MOUSEY()

SET CURSOR 10,10
Print MC
Print X
Print Z
--------

The problem lies with my matrix and terrain size paired to the screen width and height. Since my display= 1280x1024, The object can only be placed within those dimensions AND the screens pixel count originates from the opposite side of the 3d space dimension- so if you move your mouse to the top of the screen, the object is moved downwards...

SO I am asking two things. 1, how to make an object and repeat it to the mouse's position and 2, how to flip the screens pixel count so as 0,0 = 0,X,0 in 3d space AND not limit to the size of the screen. IT IS very confusing I know... but just make a terrain larger then the display mode and paste that code above... then try to position an object within mouseX and MouseY... you'll completely understand-

-Daryn

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Daryn Alsup
16
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 23rd Jul 2008 09:30
Okay, I've figured out how to invert the mouse's Y axis... searching yielded several snippets and I coded what I needed for the outcome I desired from several of them. But let me elaborate just what I mean by linking the objects.


I need to get my mesh or object to link to the previously drawn object or mesh and if at all possible -Yeah I'll do a search unless told otherwise- be able to create a curve system where- if a key is pressed and the "highway" tool is selected,- the object will curve if a location(s) on the terrain is clicked. (IE Bazier Curve)

What I am most eager to learn and know is: what is the best method to link the objects together via vertex location w/in the mesh/object or from the object/mesh's limb(s)- with little code (not for lack of skill but for little confusion in code as there will be multiple tools of this type)- and how the object/mesh should be placed in your opinion... click to click or drag and drop? PM/Email me if you'd rather not share any information publicly.
-Daryn

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.

Login to post a reply

Server time is: 2024-09-27 18:19:32
Your offset time is: 2024-09-27 18:19:32