EntityYaw, EntityRoll

Übersicht BlitzBasic Blitz3D

Neue Antwort erstellen

blitzuser34

Betreff: EntityYaw, EntityRoll

BeitragDo, März 26, 2009 22:03
Antworten mit Zitat
Benutzer-Profile anzeigen
Hi,

Code: [AUSKLAPPEN]
Graphics3D 800,600,32,2
SetBuffer BackBuffer()
AppTitle "Rotation Demo"

camera=CreateCamera()

cube=CreateCube()
MoveEntity cube,0,0,3
TurnEntity cube,-90,0,0

light=CreateLight()

Repeat
   
   TurnEntity cube,0,0,1
   
   RenderWorld
   
   Text 0,0,"EntityPitch: "+EntityPitch(cube)
   Text 0,15,"EntityYaw: "+EntityYaw(cube)
   Text 0,30,"EntityRoll: "+EntityRoll(cube)
   
   Flip
Forever


Sorry, aber ich steh grad voll aufm Schlauch. Wieso wechseln EntityYaw und EntityRoll zwischen 0, 180 und -180. Habe das Problem beim Coden an meinem Projekt entdeckt, habe da das selbe.

Klar, ich könnte die Rotationswerte abspeichern und damit arbeiten, will ich aber nicht.

Mfg
Blitzuser34

PSY

BeitragDo, März 26, 2009 23:45
Antworten mit Zitat
Benutzer-Profile anzeigen
Hier ein Auszug dazu aus dem englischen Forum:

Zitat:
When rotated 180 degrees clockwise (viewed from X+) from a zero pitch angle (points towards Z+), EntityPitch returns 0 to 90 for the first quarter turn, and 90 to 0 for the second quarter turn. When rotated 180 degrees anti-clockwise (viewed from X+) from a zero pitch angle (points towards Z+), EntityPitch returns 0 to -90 for the first quarter turn, and -90 to 0 for the second quarter turn. A positive rotational value applied to the X axis using TurnEntity, will turn an entity clockwise (viewed from X+).

When rotated 180 degrees clockwise (viewed from Y+) from a zero yaw angle (points towards X+), EntityYaw returns 0 to -180 for the first half turn. When rotated 180 degrees anti-clockwise (viewed from Y+) from a zero yaw angle (points towards X+), EntityYaw returns 0 to 180 for the first half turn. A positive rotational value applied to the Y axis using TurnEntity, will turn an entity anti-clockwise (viewed from Y+).

When rotated 180 degrees clockwise (viewed from Z+) from a zero yaw angle (points towards Y+), EntityRoll returns 0 to 180 for the first half turn. When rotated 180 degrees anti-clockwise (viewed from Z+) from a zero yaw angle (points towards Y+), EntityRoll returns 0 to -180 for the first half turn. A positive rotational value applied to the Z axis using TurnEntity, will turn an entity clockwise (viewed from Z+).


L8er,
PSY

Neue Antwort erstellen


Übersicht BlitzBasic Blitz3D

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group