Can you explain me the functioning of X_SETTEXTUREOFFSET
Its the texture offset.
The two parameters are added to all UV co-ordinates for a model to make the texture 'scroll' by a certain amount, horizontally and vertically.
Think of it as quick way to rotate a skin around a model or scroll a repeated texture accross a polygonial plane.
I do not arrive has to use this function(office), can you make me an example
Thank you
Hi mich19
Here is a X_SETTEXTUREOFFSET example
LIMITFPS 60
//Call Create_Ground_Function
Create_Ground(400,0,400,RGB(255,255,255))
//Load Texture
LOADSPRITE "Your_Texture.bmp",1
//LOOP
//-------------------------------------------------------
WHILE TRUE
X_MAKE3D 1,2000,45
X_CAMERA 0,0,-1200,0,0,0
X_MOVEMENT 0,0,0
X_SCALING 1,1,1
X_ROTATION 90,1,0,0
X_SETTEXTURE 1,-1
//Scroll texture (dx,dy)
//dx=dx-0.005
dy=dy+0.01
X_SETTEXTUREOFFSET dx,dy
X_DRAWOBJ 1,0
SHOWSCREEN
WEND
// ---------------------------------------------------------//
// CREATE_GROUND
// ----------------------------------------------------------//
FUNCTION Create_Ground: Gr_X,Gr_Y,Gr_Z,Gr_Color
X_OBJSTART 1
X_OBJADDVERTEX -Gr_X,0,-Gr_Z, 0,0,Gr_Color
X_OBJADDVERTEX Gr_X,0,-Gr_Z, 1,0,Gr_Color
X_OBJADDVERTEX -Gr_X,0, Gr_Z, 0,1,Gr_Color
X_OBJADDVERTEX Gr_X,0, Gr_Z, 1,1,Gr_Color
X_OBJEND
ENDFUNCTION
Have a nice day :)
Cheers
Good example :)
I'll put that in the manual then!?
Thank you for the speed and the quality of the example