XYZ Axis line thingy for confused beginners, or measuring game units by Someone26th Mar 2004 5:00
|
---|
Summary Just a function makes 3 lines across the X Y and Z axis, well, really line of spheres. fully customisable by passing info to the function. Description Being a beginner to Dark Basic classic myself, I was condused at what exactly a game unit was, where in my 3D world I was, and what I should put where, and scaling and such. So i figured the basic thing to do would be make 3 lines showing X Y and Z. and maybe number them like a measuring tool. Well, I don't know how I could number them. (if you really wanted to I suppose you could make 10 textures with the numbers on them and have those applied to the spheres during the loops...) Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com Function 3DAXIS(x,y,z,dist,number,size) if number>99 Then Print "Error: Number may not exeed 99" make object sphere 1400,size*2 Position object 1400,x,y,z dot=0 Repeat Make Object Sphere 1100+dot,size Position Object 1100+dot,x+dist+(dot*dist),y,z Color Object 1100+dot,RGB(0,255,0) dot=dot+1 Until dot=number dot=0 Repeat Make Object Sphere 1200+dot,size Position Object 1200+dot,x,y+dist+(dot*dist),z Color Object 1200+dot,RGB(255,0,0) dot=dot+1 Until dot=number dot=0 Repeat Make Object Sphere 1300+dot,size Position Object 1300+dot,x,y,z+dist+(dot*dist) Color Object 1300+dot,RGB(0,0,255) dot=dot+1 Until dot=number EndFunction |