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 / Some Equations

Author
Message
MattIsFunA
21
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 26th Mar 2003 17:26
Does anybody know the code or equations to find x and z rotation of an object based on the heights of its four corners? An example of this would be a car. Given the heights of its tires, how would you find its x and z rotation?
actarus
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 26th Mar 2003 17:33 Edited at: 26th Mar 2003 18:01
I believe you could find some answers over there:

http://www.designrealm.co.uk/tmc/

Also,that's the wrong forum.

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour!
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Mar 2003 22:17
depends on the suspension type within the vehical...
what you'd do is calculate the height of the 4 wheels, then add to that the bellcurve for the suspensions reaction (crossproduct if they're not wishbone suspension)

you then calculate where the CG of the vehical would be, which is the crossproduct of the wheelbase (distace between the wheels, both on X+Z)
then the center of the actual mass ... you then take the crossproduct of those two values and Add it to the original CG value (which should offset it to the rear of the vehicle slightly)

like so CG.Y = CG.Y - (((tensionOfSuspension + WheelDiametre)+ CG.Y)/2)

that should be basically all you now need to do this on a basic scale...

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
MattIsFunA
21
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 27th Mar 2003 19:41
Well, I'm not calculating anything like suspension for now. Basically, what I want to do is find the xz location of each wheel (basically using boxes to guess and check until I've got them), plug that into the get ground height() function, and then somehow use those heights to figure out the x and z rotations of the entire car... can that be done?

MattIsFunA
21
Years of Service
User Offline
Joined: 26th Mar 2003
Location:
Posted: 27th Mar 2003 19:44
"Also,that's the wrong forum."

What's the right forum? It doesn't have to do with any specific version of DB, so I didn't put it in the DB or DBPro forums. Basically, since it's a 3D math question, the 3D forum seemed like a good choice... anyway, I'll check that site out.

actarus
21
Years of Service
User Offline
Joined: 29th Aug 2002
Location: 32 Light Years away
Posted: 27th Mar 2003 21:12
'For everything about creating, modifying and using 3D models in your own games this is the forum to read'

I agree one could interpret this in many ways.

Just remember that you're standing on a planet that's evolving
And revolving at nine hundred miles an hour!
Stevo
21
Years of Service
User Offline
Joined: 4th Oct 2002
Location:
Posted: 31st Mar 2003 16:38
matt, to make your vehicle body roll as it goes over a matrix, roll with the matrix
atanfull(ground height left wheel,gheight right wheel) then divide that by how far the wheels are apart

something like that

Login to post a reply

Server time is: 2024-05-03 23:35:47
Your offset time is: 2024-05-03 23:35:47