Jump to content

  • Log In with Google      Sign In   
  • Create Account


using gluLookAt


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Magicchessmaster   Members   -  Reputation: 122

Like
Likes
Like

Posted 19 August 2001 - 11:40 AM

I have two ships in a 3d space environment. sooner or later i will add an AI so one ship moves freely; anyway, i want to be able to set a camera on the back of the player''s ship. the ship should be able to move freely, rotate etc. and still have the camera on it''s back. if it works correctly, it looks like the player is moving through space, planets and this other ship moving towards/away from it. how do i set it up using gluLookAt, and how do i move the ship(s) foward, back, and rotate them? (also, if i moved through space, would the pixels/planets appear to move if they really didn''t?)

Sponsor:

#2 promo   Members   -  Reputation: 122

Like
Likes
Like

Posted 20 August 2001 - 10:35 PM

Ok, the stars wont move with the player if you draw them as you normally would,
that is - glLoadIdentity() and then translate to each star/player and draw it.

to use gluLookAt you need the ships x,y,z and angle for each axis.
the x,y,z coordinates are the first 3 params to the function.
for the other ones to need to use some 3d trigonometry to get the values.
keep in mind that the second trio (look at position) is a POINT in world coords, while the 3rd one (top direction) is a VECTOR who''s origin is 0,0,0.

so, what you''''re saying is, that the mushroom spores were brought in from outer space by - who??




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS