Author Topic: Sliding texture coordinates  (Read 2929 times)

Offline C3R14L.K1L4

  • int
  • **
  • Posts: 54
    • View Profile
    • CK's place of many works
Sliding texture coordinates
« on: January 06, 2009, 09:37:52 pm »
Greetings,

I've been using this API for some days ago and I must say it's quite good, and with a very smooth learning curve. However, I'm having some problems while trying to change the texture coordinates of some Object3D.
I'm adding to the world a simple skybox, with clouds tilled on the faces of the cube, and I want to slide the textures (ie, change their coordinates). I've checked PolygonManager but I don't know how to use it. Any help would be appreciated.

Kind regards,
CK

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Sliding texture coordinates
« Reply #1 on: January 06, 2009, 09:45:43 pm »
The PolygonManager can be obtained from the object, in this case from your skybox. The manager has a method setPolygonTexture(int polyID, TextureInfo tInf), which can be used to alter the coordinates. Finding the right polyID for the polygons in question and setting the correct u/vs can be a bit of trial-and-error, but for a simple box, it should be pretty easy to find out.