Skip to content

PositionTexture

Narta Xaymar Dirks edited this page Nov 25, 2026 · 13 revisions

PositionTexture Blitz3D

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 Horizontal offset.
v_offset In Float32 required Vertical offset.

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 BlitzLLVM, CreateTexture Blitz3D, FreeTexture Blitz3D, LoadAnimTexture Blitz3D, LoadTexture Blitz3D, RotateTexture Blitz3D, SaveTexture BlitzLLVM, ScaleTexture Blitz3D

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally