With this code , use cursor to move entity, and it crash.; ---------------------------
; Microsoft Visual C++ Runtime Library
; ---------------------------
; Assertion failed!
;
; Program: ...
; File: y:\ogremain\include\OgreAxisAlignedBox.h
; Line: 246
;
; Expression: (min.x <= max.x && min.y <= max.y && min.z <= max.z) && "The minimum corner of the box must be less than or equal to maximum corner"
;
; For information on how your program can cause an assertion
; failure, see the Visual C++ documentation on asserts
;
; (Press Retry To Debug the application - JIT must be enabled)
; ---------------------------
; Abandonner Recommencer Ignorer
; ---------------------------
[EDIT] code changed
Code: Select all
#Deg2Rad = #PI/180
#Rad2Deg = 180/#PI
IncludeFile "Screen3DRequester.pb"
If InitEngine3D()
InitSprite()
InitKeyboard()
InitMouse()
Add3DArchive("Data\" , #PB_3DArchive_FileSystem)
Add3DArchive("Cube\", #PB_3DArchive_FileSystem)
If Screen3DRequester()
;-Entité A
LoadMesh(0,"Cube.mesh")
CreateMaterial(0,LoadTexture(0,"background.png"))
CreateEntity(0,MeshID(0), MaterialID(0))
;-Camera
CreateCamera(0, 0, 0, 100, 100)
CameraLocate(0, 0, 1400, 250)
CameraLookAt(0,EntityX(0),EntityY(0),EntityZ(0))
Define AngleY.f, LookAt.f
LookAt=1.0
Repeat
ExamineKeyboard()
AngleY-ACos(LookAt)*#Rad2Deg
Debug angley
Debug "******"
RotateEntity(0,0,angleY,0)
LookAt+00000011920929
RenderWorld()
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
EndIf
Else
MessageRequester("Error", "The 3D Engine can't be initialized",0)
EndIf
End