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 / adjust object to matrix?

Author
Message
AluminumPork
21
Years of Service
User Offline
Joined: 28th Oct 2003
Location: Duluth, MN, USA
Posted: 12th Jan 2004 22:32
I've got a little tank model, and I'm looking for a way to make it conform to a matrix. Such as if the tile in front of it is higher, angle the tank to the angle of the matrix, and adjust accordingly. It seems like a pretty common thing, but I couldn't find anything on the forums about it. Thanks.
Moggie100
22
Years of Service
User Offline
Joined: 15th Oct 2002
Location: Behind You...
Posted: 13th Jan 2004 02:23 Edited at: 13th Jan 2004 02:23
Hmm... lots of people have had trouble with this sort of thing...

My advice to you would be to read the terrain height from not 1 point, but 4, arranged like so:

x x
x x

around the tank, then work out using math weather the tank is going to tip over to balace on the front, back, left, or right side, then use the curveangle command to roll it smoothy from one to the other.

However I havent done this myself, so all this is theoretical I'm afraid. I'll have a look at it though, as it would be handy to have a way of doing this easily.

Also look at the 'Tank' demo that came with DB/DBP as the tank in there adjusts with the matrix.
AluminumPork
21
Years of Service
User Offline
Joined: 28th Oct 2003
Location: Duluth, MN, USA
Posted: 13th Jan 2004 06:13
yeah, I've tried that... and it seemed to work. Except that if I turn my object the opposite direction then it simply rotate in the same direction as if I was still going straight. So if I go up a hill after turning left or right, my tank would simply flip over. I'm almost to the point where I want someone else to look at my code and do it for me. lol, I looked at the tank example, and I also tried the tutorial online. Neither seemed to work.

Login to post a reply

Server time is: 2025-06-27 20:00:48
Your offset time is: 2025-06-27 20:00:48