Jetzt bin ich aber verwirrt, meintest du nicht das, dass gefixt sei?
Um das ganze mal an Hand eines Beispiels zu verdeutlichen:
Code: Alles auswählen
InitEngine3D()
InitSprite()
OpenWindow(0,0,0,800,600,"",#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,800,600,0,0,0)
CreateLight(0,RGB(255,255,255))
CreateCamera(0,0,0,100,100)
CameraLocate(0,16,16,16)
CameraLookAt(0,-5,0,-5)
SetFrameRate(60)
#MoveNode = #True
Enumeration
#None
#Node
EndEnumeration
Enumeration
#None
#Red
#Blue
#Green
EndEnumeration
Enumeration
#None
#Cube
EndEnumeration
Enumeration
#None
#BoxA
#BoxB
#Ground
EndEnumeration
CreateNode(#Node)
CreateTexture(#Red,1,1)
StartDrawing(TextureOutput(#Red))
Plot(0,0,RGB(196,0,0))
StopDrawing()
CreateMaterial(#Red,TextureID(#Red))
CreateTexture(#Green,1,1)
StartDrawing(TextureOutput(#Green))
Plot(0,0,RGB(0,196,0))
StopDrawing()
CreateMaterial(#Green,TextureID(#Green))
CreateTexture(#Blue,1,1)
StartDrawing(TextureOutput(#Blue))
Plot(0,0,RGB(0,0,196))
StopDrawing()
CreateMaterial(#Blue,TextureID(#Blue))
CreateCube(#Cube,1)
CreateEntity(#Ground,MeshID(#Cube),MaterialID(#Blue),-5,-1,-5)
ScaleEntity(#Ground,10,1,10)
EntityPhysicBody(#Ground,#PB_Entity_BoxBody,0)
CreateEntity(#BoxA,MeshID(#Cube),MaterialID(#Red),-5,0,-8)
EntityPhysicBody(#BoxA,#PB_Entity_BoxBody)
CreateEntity(#BoxB,MeshID(#Cube),MaterialID(#Green),-5,0,-2)
EntityPhysicBody(#BoxB,#PB_Entity_BoxBody)
AttachNodeObject(#Node,EntityID(#BoxA))
Repeat
Event = WaitWindowEvent(1)
If #MoveNode = #True
MoveNode(#Node,0,0,0.1)
Else
MoveEntity(#BoxA,0,0,10)
EndIf
RenderWorld()
FlipBuffers()
Until Event = #PB_Event_CloseWindow
Wenn #MoveNode = #True ist, kollidiert das ganze nicht (da es mit MoveNode bewegt wird), wenn #MoveNode = #False ist kollidieren die beiden Cubes (da es nun mittels MoveEntity bewegt wird).
Bei mir ist das ganze also nicht gefixt. Oder habe ich irgendwas falsch verstanden?