PDA

View Full Version : display list + 3d model



Andrew Waller
01-22-2006, 09:17 AM
Hi everyone,

I have a room stored in a display list I can move around this room fine without any problems what so ever.

when I put a 3d model into this room how ever when I move around the room the 3 model also follows me around.

The 3D model is also stored in a display list.
when displaying the model Im simply using the

glLoadIdentity();
glTranslated(0,0,-10);
glCallList(Model1);

This is obviously not the right way of placing this model in the room can anybody shed some light on how I can better place the model in the room.

jide
01-22-2006, 09:26 AM
Was my reply on the other forum so bad for you or what ? :mad:

Andrew Waller
01-22-2006, 09:40 AM
no man it was cool just didnt work out quite the way I had hoped as I still have the same problem if u send me your email I will send you on a look at what Im talking about as its hard to explain

Helidium
02-01-2006, 04:22 AM
well you reset the matrix with glIdentity(), so the model is always in the same place! What you must do, is to set the same transformation to the object, as you did to the world

Zengar
02-01-2006, 09:03 AM
More specific:

glLoadIdentity

set your matrix
draw your room

adjust the matrix for the model(with gltranslate usw)
draw your model

You may also try to use glPushMatrix, glPopMatrix if you want more structure.

And this question belongs to the beginners forum ;-)
yeah, I like telling this to people

Andrew Waller
02-14-2006, 08:04 AM
ok so I have it kind of working now however when I move about the world now I am moving about in all different angles and depending on which way Im moving about the model may appear closer to me or it may appear way off in the distant.

Any Ideas how I can possibly fix this problem?