Hilfe

UpdateWorld

B3D

Aufruf

UpdateWorld [zeit#]

Parameter

zeit# Parameter für Zeitkontrolle (Standard=1)


Rückgabewert

-


Beschreibung

Die Anweisung UpdateWorld animiert alle Objekte und überprüft die auf Kollision.

Der optionale Parameter "zeit#" gibt an, wie schnell die gesamte Animation ablaufen soll. Standardwert ist immer 1. Wenn es erhöht wird, dann wird die Animation schneller abgespielt. Bei einem kleineren Wert wird die Animation entsprechend langsamer.

Die besten Ergebnisse werden erzielt, wenn UpdateWorld jedes Mal im Hauptprogramm ausgeführt wird und vor RenderWorld geschrieben wird.


Beispiel

Standardbeispiel:

Graphics3D 640, 480, 16, 2
SetBuffer BackBuffer()
camera = CreateCamera()
light = CreateLight()
cube = CreateCube()
PositionEntity camera, 0, 0, - 5
RotateEntity light, 90, 0, 0
EntityColor cube, 150, 200, 250

RotateEntity cube, 0, 0, 0
PositionEntity cube, - 2, 0, 2
SetAnimKey cube, 0

RotateEntity cube, 30, 30, 30
PositionEntity cube, 2, 0, 2
SetAnimKey cube, 100, 1, 1

RotateEntity cube, 180, 60, 60
PositionEntity cube, - 2, - 2, 5
ScaleEntity cube, 1, .5, 2

SetAnimKey cube, 200
AddAnimSeq cube, 200
Animate cube, 2

While Not KeyHit(1)
   UpdateWorld
   RenderWorld
   Text 0, 0, "Animating:" + Animating(cube)
   Text 0, 20, "AnimLength:" + AnimLength(cube)
   Text 0, 40, "AnimSeq:" + AnimSeq(cube)
   Text 0, 60, "AnimTime:" + AnimTime(cube)
   Flip
Wend
End


Siehe auch

AddAnimSeq, Animate, CaptureWorld, RenderWorld

Übersicht 3D Grafik Global