Page 1 of 1

[Done] PB 6.21 - CreateLine3D() Bug

Posted: Wed Mar 19, 2025 5:54 pm
by Mijikai
CreateEntity() fails on the CreateLine3D() mesh!
Tested on Linux + PB 6.21. (have not tested this on Windows!)

Code (based on the example from the help):

Code: Select all

InitEngine3D() 
InitSprite() 

OpenWindow(0, 0, 0, 640, 480, "Line3D example", #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, 1, 3, #PB_Absolute | #PB_Local)
CameraLookAt(0, 0, 0, 0)

; Erstelle die Linie und binde sie an die Szene
CreateLine3D(0, 0, 0, 0, RGB(255, 0, 0), 1, 1, 1, RGB(0, 0, 255))
Debug CreateEntity(0, MeshID(0), #PB_Material_None);<- does not create the entity!

Repeat
  
  RotateEntity(0,0.5,0.5,0.5,#PB_Relative);<- can not rotate the line!
  
  RenderWorld()
  FlipBuffers()
Until WaitWindowEvent(1) = #PB_Event_CloseWindow

Re: PB 6.20 - CreateLine3D() Bug

Posted: Fri Mar 21, 2025 10:46 pm
by Psychophanta
Confirmed in windows same behaviour!

Re: PB 6.21 - CreateLine3D() Bug

Posted: Mon Sep 01, 2025 8:03 pm
by Fred
The doc is wrong, you can't create an entity with line3D, it's automatically displayed. I will update it and change the example.