Btw: I thought using #PB_Engine3D_Adjusted returns a value from 0 to 360. But it doesn't. There is no difference to #PB_Engine3D_Raw.
Code: Select all
InitEngine3D()
InitSprite()
OpenWindow(0, 0, 0, 640, 480, "RotateEntity Bug", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0), 0, 0, 640, 480, 0, 0, 0)
; Light
CreateLight(#PB_Any, RGB(25, 25, 180), -5, 10, 5, #PB_Light_Point)
; Camera
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 2, 4, 3, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)
; Create the torus and attach it to the scene
CreateTorus(0, 1, 0.3)
CreateEntity(0, MeshID(0), #PB_Material_None)
OpenConsole()
Repeat
RotateEntity(0, EntityPitch(0,#PB_Engine3D_Adjusted)+0.0,EntityYaw(0,#PB_Engine3D_Adjusted)+0.25,EntityRoll(0,#PB_Engine3D_Adjusted)+0.0, #PB_Absolute)
;RotateEntity(0, 0.25, 0.25, 0.25,#PB_Relative)
Print(StrF(EntityPitch(0),1)+":"+StrF(EntityYaw(0),1)+":"+StrF(EntityRoll(0),1)+Chr(10))
RenderWorld()
FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow