I tried playing around with
AGKVR Demo 2 - Castle Advanced, and suddenly, the repeated floor texture became insanely oversized, with each (blured) pixel visible. But I never changed the code for the floor:
//Field
floorTexID = LoadImage("TerrainGrass.png")
SetImageWrapU( floorTexID, 0 )
SetImageWrapV( floorTexID, 0 )
floorBoxID = CreateObjectBox( 200, 10, 200 )
SetObjectImage( floorBoxID, floorTexID, 0 )
SetObjectMeshUVScale( floorTexID, 1, 0, 200, 200 )
SetImageWrapU(floorTexID,1)
SetImageWrapV(floorTexID,1)
//SetObjectColor( floorBoxID, 112, 100, 100, 255 )
SetObjectLightMode( floorBoxID, 1 )
SetObjectPosition( floorBoxID, 0, -5, 0 )
//This command creates a static physics body for the floor box with a triangle mesh collision shape.
//A static physics body has no mass and does not get moved.
Create3DPhysicsStaticBody( floorBoxID )
//This 3D Physics command changes the collision shape to a primative box shape since we do not need the accuracy of
// polygon collision for just a box. The physics body is still static.
SetObjectShapeBox( floorBoxID )
That code is exactly the same as the original. So obviously I messed with some other code which caused a change in texture scale. So I wonder, which commands can influences the scale of a texture?
(This is offtopic, but do you think there is reason for
SetImageWrapU() and
SetImageWrapV() to be repeated in the code?)