MaterialObject::SetTexcoordVelocity
Defined in:
Sets the animation velocity for a texcoord.
C4MaterialObjects.h
Prototype
void SetTexcoordVelocity(int32 index, const Vector2D& velocity);
Parameters
index |
The texcoord index. This must be 0 or 1. |
velocity |
The new texcoord animation velocity, in inverse milliseconds. |
Description
The SetTexcoordVelocity
function sets the animation velocity that is applied to the texcoord specified by the index
parameter. The x coordinate of the velocity
parameter is the velocity of the s texture coordinate, and the y coordinate of the velocity
parameter is the velocity of the t texture coordinate. The texcoord velocity is multiplied by time in milliseconds to determine the texcoord offset. The default velocity is (0,0).In order for animation to be applied to a particular texcoord, the corresponding material flag must be set. Set the
MaterialObject::SetMaterialFlags
function.
Special Considerations
Each component of the texcoord animation velocity must be an integer when multiplied by 120000 milliseconds (two minutes). The internal timers used by the engine for texcoord animation have a two minute period, and a velocity that does not cause a texture to wrap an integer number of times during this period will cause a visible jump to occur every two minutes.
See Also