Hilfe

RotateTexture

B3D

Aufruf

RotateTexture textur%, winkel#

Parameter

textur% Identität einer Textur
winkel# Absoluter Drehwinkel 0-360 Grad


Rückgabewert

-


Beschreibung

Die Anweisung RotateTexture dreht eine Textur auf einen bestimmten absoluten Winkel. Jede geladene/erstellte Textur wird zuerst auf den Winkel 0 gedreht. Gültige Winkel sind 0-360 Grad.

Beachte: Alle Objekte, die diese Textur benutzen, werden danach eine gedrehte Textur haben. Dies kann aber auch nützlich sein z.B. für Raucheffekte...


Beispiel

Standardbeispiel:

Graphics3D 640, 480
SetBuffer BackBuffer()
camera = CreateCamera()
light = CreateLight()
RotateEntity light, 90, 0, 0
cube = CreateCube()
PositionEntity cube, 0, 0, 5
tex = LoadTexture("media/b3dlogo.jpg")
EntityTexture cube, tex
angle# = 1

While Not KeyHit(1)
   If KeyDown(205) = 1 Then angle# = angle# - 1
   If KeyDown(203) = 1 Then angle# = angle# + 1
   RotateTexture tex, angle#
   TurnEntity cube, 0.1, 0.1, 0.1
   RenderWorld
   Text 0, 0, "Benutze Links/Rechts-Tasten"
   Text 0, 20, "angle#=" + angle#
   Flip
Wend
End


Siehe auch

CreateTexture, LoadTexture, ScaleTexture

Übersicht 3D Grafik Texturen