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 / Perfect Terrain Collision

Author
Message
TheAbomb12
21
Years of Service
User Offline
Joined: 14th Aug 2003
Location: Amist the blue skies...
Posted: 7th Nov 2003 00:25
Hey Guys,

Im in the process of making a game that requires a tank to tilt to a matrix landscape full of hills. I have already tried a method where I calculate for 4 points around the tank (front, back, left, right), and I calculate thier change of Y position and apply that to tilt the tank. It does its job right I guess, but this method requires lots of room for error; the tank often goes into the ground or doesnt tilt enough in the right direction. I have played around with this for the better part of this week, but I still cannont find a suitable arrangement to get the tank to "perfectly" align itself to the ground without some sort of clipping.

My question is, is there another method for calculating landscape tilting that is more accurate; where an object dosent go "through" the matrix so much?

Amist the Blue Skies...
Northern Fist
21
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 7th Nov 2003 04:24
This is a very big pickle.

The best thing to do is make even more points outlining the tank and have them constantly updated and checked. I've had this problem before with matrix collision, and more points is the best thing to do. It would be dandy if there was matrix collision, sorry.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
arras
22
Years of Service
User Offline
Joined: 3rd Feb 2003
Location: Slovakia
Posted: 7th Nov 2003 10:18
Your aproach to the problem is right. I did the same way my source, were ship align with waves (matrix) You should add two check points in the middle of your tank on its both sides. Also my ship sits inside of waves so its bit diferent hove I apply data gained from check points to ship angles and position but principe is the same.

You must know hover that some corners of your tank have to be in the air above the ground if you want to have it right. Thats because bottom of your tank is flat and box like shaped, terain is triangle shaped.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Nov 2003 11:22
I suggest adding dummy limbs to your tank - like on the front, back, left, and right sides, on the ground - you could add a cube limb, which you can hide with code. If you get these dummy limbs in place - you can calculate the location and do your ground checks from that instead of using new value commands. The benefit is that with new value commands, most of the time you would'nt allow for tilting adjustments, but with limbs - your positioning is precise without all the fancy maths. That's how I did it with Stoked, and I'd say that had pretty decent ground collision (the source was uploaded, perhaps it'd help to take a look at what I did with that).


Van-B


I laugh in the face of fate!

Login to post a reply

Server time is: 2025-06-27 09:01:53
Your offset time is: 2025-06-27 09:01:53