Page 1 of 1

CreateLine3D() possible bug?

Posted: Wed Mar 12, 2025 12:31 am
by Mijikai
CreateEntity() fails on the CreateLine3D() mesh!
Tested on Linux + PB 6.20.

Can someone confirm?

Code:

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: CreateLine3D() possible bug?

Posted: Wed Mar 12, 2025 1:04 am
by miso
It's intended, it can only be recreated to a new position. Using the CreatEntity() command in the example of the pb documentation is wrong.
I guess you are working on a 3d model editor ;)

Re: CreateLine3D() possible bug?

Posted: Wed Mar 12, 2025 10:38 pm
by Mijikai
Ok, thats pretty meh if i need to recreate them just to move them around.
The documentation made it look more useful. :(
miso wrote: Wed Mar 12, 2025 1:04 am I guess you are working on a 3d model editor ;)
An editor would be nice (something like picoCad) :)
Currently i try to convert a simple 2d game.

Re: CreateLine3D() possible bug?

Posted: Wed Mar 12, 2025 10:48 pm
by miso
Ok, thats pretty useless if i need to recreate them just to move them around.
The documentation made it look more useful. :(
It might depend on the needs, I find it quiet useful.
(something like picoCad)
Hah, I'm also inspired by pico-8 on some personal project. Namely the sprite editor, map editor + sound editor.
I'm also thinking on an editor with a very different approach to anything I've seen. (for absolutely lowpoly stuff, with tiny binary size)

I'm not sure if it will be good or not.

Re: CreateLine3D() possible bug?

Posted: Thu Mar 13, 2025 9:58 am
by threedslider
Mijikai wrote: Wed Mar 12, 2025 10:38 pm An editor would be nice (something like picoCad) :)
Hello @Mijikai, me too I am working on PureCAD but i need to advance a little bit :lol:

Good luck on that and I am looking forward to this as well :mrgreen:

Happy coding !

Re: CreateLine3D() possible bug?

Posted: Tue Mar 18, 2025 9:56 am
by Psychophanta
Imo it is a bug, or a fault in the documentation.

Re: CreateLine3D() possible bug?

Posted: Wed Mar 19, 2025 5:56 pm
by Mijikai
Thanks everyone.
I decided to go ahead and created a post it in the Linux Bug section.