Skip to content

PositionTexture

Claude edited this page Oct 27, 2026 · 13 revisions
Blitz3D

PositionTexture

PositionTexture texture:Int32, u_offset:Float32, v_offset:Float32
Parameter Type Default Description
texture Int32 required The texture to move.
u_offset Float32 required
v_offset Float32 required

Description

Moves the texture coordinates by an absolute offset. The image appears to slide across the surface, which is how scrolling water or conveyor belts are done. The offset is a fraction of the texture: 1 moves it by one full repeat, which looks the same as 0. Every entity that uses the texture changes at once.

Examples

Graphics3D 320, 240, 0, 2
SetBuffer BackBuffer()
camera = CreateCamera()
CameraClsColor camera, 70, 100, 160
light = CreateLight()
plane = CreateCube()
ScaleEntity plane, 2.2, 1.2, 0.05
PositionEntity plane, 0, 0, 4

tex = CreateTexture(64, 64)
SetBuffer TextureBuffer(tex)
ClsColor 30, 120, 200
Cls
Color 255, 255, 255
For i = 0 To 3
	Rect i * 16 + 4, 0, 8, 64, 1
Next
SetBuffer BackBuffer()
EntityTexture plane, tex
For i = 0 To 39
	PositionTexture tex, i / 40.0, 0
	RenderWorld
	Flip
Next

Media

PositionTexture

Related Commands

ClearTextureFilters, CreateTexture, FreeTexture, LoadAnimTexture, LoadTexture, RotateTexture, ScaleTexture, SetTextureSampler 〔BlitzLLVM〕

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally