Vector3f help

I was playing around with the ASE loader demo and I’m trying to write a program that loads the tank and lets you drive it around using the arrowkeys.

My problem is that I’m not sure which dimensions x, y, and z represent. I know in 2 dimensions, x and y represent height and width. Which is height, width, depth?

[Deleted]

[quote]In normal opengl, positive z is up, positive x is left, positive y is forward. I would suggest sticking with it in your world. Question is, how your models are oriented ?
[/quote]
Maybe I’m misunderstanding you, but in OpenGL the Y-Axis is “up” and the Z-Axix is “forward” to the viewer. Difficult to say in English for me. :wink:

A picture says more. From the OpenGL Redbook:

http://www.parallab.uib.no/SGI_bookshelves/SGI_Developer/books/OpenGL_PG/sgi_html/figures/chap3-19.gif

Edit: of course I have messed it up - thinking about one, telling second. Corrected (thanks Preston)

In normal opengl, positive x is left, positive y is up, positive z is forward. I would suggest sticking with it in your world. Question is, how your models are oriented ?

if u are saving ase out of 3dsmax at the defult export- then u should seem to look down on your model. in opengl its correct. 3dsmax just uses a different xyz. all u need to do is export as a opengl xyz instead. u can set this in max :slight_smile:

Aight, I figured it out, thanks. I said I was playing with the ASE loader demo, I meant the one provided in the GSG, so I was using Will’s(?) 3ds Max model. I’ll show you my new demo as soon as I get the turret moving properly (ie, not so it can shoot through the front of the tank itself).

I recommend using TranformGroup Trees for that, perfect at animating tanks (and so it should be since animating tanks was my motivation for coding it in the first place) :slight_smile:

Will.

Will, is your own tank model set up for grouping? After reading the tute, it sounds like the model has to be specially prepared for a TG tree to work correctly.