Skip to content

PositionTexture

Narta Xaymar Dirks edited this page Oct 28, 2026 · 9 revisions
Blitz3D

PositionTexture

PositionTexture:Void texture:Int32, u_offset:Float32, v_offset:Float32
Parameter Mode Type Default Description
texture In Int32 required The texture to move.
u_offset In Float32 required
v_offset In 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, 1 + 4096)
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

AtlasTexture, CreateTexture, FreeTexture, LoadAnimTexture, LoadTexture, RotateTexture, SaveTexture 〔BlitzLLVM〕, ScaleTexture

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally