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.

3 Dimensional Chat / My problem with tilting to a matrix (code inside)

Author
Message
AluminumPork
21
Years of Service
User Offline
Joined: 28th Oct 2003
Location: Duluth, MN, USA
Posted: 13th Jan 2004 07:54
Alright... I posted a message earlier, but the answers I got were things I had already tried. I've got a tank, on a matrix with hills and what not. You view the tank from a top down view and rotate it left or right with the arrow keys. You press up to move the tank in the current direction. All of the tilt code I've found only works if the tank always moves in the same direction, never backwards, and I cannot turn left or write with the tilt still working correctly. I put my code and all the files necessary (hopefully) to run it on my site.

http://www.frostyle.com/tank.dba
http://www.frostyle.com/level4.map
http://www.frostyle.com/level4_texture.map
http://www.frostyle.com/tank_body.x
http://www.frostyle.com/tile.jpg

Phew, lol. When you run tank.dba, simply type "level4" into the prompt for what level to load. Tell me what you think I should do. Thanks! I need extreme help with this one, this is a game stopping problem.
AluminumPork
21
Years of Service
User Offline
Joined: 28th Oct 2003
Location: Duluth, MN, USA
Posted: 13th Jan 2004 07:57
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 13th Jan 2004 10:31
Ahh, you know I just did some handling like this for a jeep and it worked out pretty well. I used a limbed model, like the body was limb 1, then the wheels were limbs 2 to 5. I simply grabbed the ground height and limb height of all the wheels and used it to ascertain what the real wheel heights should be, then I rotate limb 1 to suit the angle of the landscape.

Because of the way DB handles it's rotations, you can't rotate an object on X and Y at the same time, to do what your trying to do, you'd have to glue your tank onto a hidden dummy object and then rotate the dummy object on Y, and the tank object on X - however rotating limb 1 means you don't have to worry about that.

If you can get 4 dummy limbs into the corners of the tracks I can give you a little example (like email me the .3DS and .X versions of your tank with the limbs setup and pivots set). Obviously it's more logical with a jeep because you simply use it's wheels with a drop off height to find the base, but with a tank you'd need dummy limbs.


Van-B

Van-B


The nature of Monkey was irrepressible!.
arras
22
Years of Service
User Offline
Joined: 3rd Feb 2003
Location: Slovakia
Posted: 13th Jan 2004 11:52
You dont have to use hidden object if you use turn/pitch commands instead of rotate object command.
Store your angles in variables and each time you want to rerotate your object useing them reset object rotation to 0,0,0 then aply firsth turn object right for yangle and pitch object down for xangle.

Make the same job like example Van B wrote about but you dont have to use hiden object. You have to store angles in variables but that you want to do anyvay if you want to made something more complex with your tank (like showing player where is tank heading)
faxmaster
21
Years of Service
User Offline
Joined: 9th Jan 2004
Location: Duluth, MN
Posted: 13th Jan 2004 17:43 Edited at: 13th Jan 2004 17:44
Argh, I should have guessed this would mean more work for me as well (I'm the modeler for the little game this code will be used for). If you will excuse my newbishness, are limbs the same things as bones? That is, when I export to a .x file, are the bones I used to rig the model translated to limbs (using milkshape btw). Or are the limbs the geosets the bones are attached to? Heh, i'm so lost. Makes me feel insignificant. Is there any place you can direct me to that describes the .x format? Then I can start helping my buddy AluminumPork up there get this code workin'.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 13th Jan 2004 18:30
Faxmaster,
Both - a limb can be a seperate mesh, and bones take the form of limbs in DBPro to allow manual animation. If you made 2 boxes in milkshape, you'd have 2 limbs.

I might make a little tutorial with me little jeep going over some terrain, I'll have to see how much time I have spare.


Van-B


The nature of Monkey was irrepressible!.
AluminumPork
21
Years of Service
User Offline
Joined: 28th Oct 2003
Location: Duluth, MN, USA
Posted: 14th Jan 2004 06:49
hmm... An example program would be great. btw, I'm using DBclassic not DPpro. I don't really understand how the tank demo that came with DB can use that method, but I can't use it in ours. It seems we're doing basically the same thing. A tank crossing a matrix.

But yes, an example would be excellent. I have a feeling that an example would be the only way we can get this done. I'll have faxmaster send you our models 2morrow. Thanks alot!

Login to post a reply

Server time is: 2025-06-28 04:11:44
Your offset time is: 2025-06-28 04:11:44