Page 1 of 1

[PB6.10LTS] Absolute ScaleEntity() does not work

Posted: Wed Mar 06, 2024 1:44 pm
by Psychophanta
ScaleEntity() with the '#PB_Absolute' should RESIZE the entity to the entered params.
Please test yourself

Code: Select all

InitEngine3D(#PB_Engine3D_NoLog,#PB_Compiler_Home+"Compilers\Engine3d.dll")
InitSprite():InitKeyboard():InitMouse()
OpenWindow(0,0,0,800,600,"v",#PB_Window_BorderLess|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,800,600,1,0,0,#PB_Screen_WaitSynchronization)
CreateCamera(0,0,0,100,100)
MoveCamera(0,0,0,2,#PB_Absolute)
CreateCylinder(0,0.05,1)
CreateEntity(0,MeshID(0),#PB_Material_None,-0.5,0,0)
CreateEntity(1,MeshID(0),#PB_Material_None,0.5,0,0)
ScaleEntity(1,1,1,1,#PB_Absolute); <- it should be the same height than width (1 world units for width, 1 world units for height, 1 world units for depth)   !!!!!!!!
Repeat
  Repeat:Eventodeventana.i=WindowEvent():Until Eventodeventana=0
  ExamineKeyboard()
  RenderWorld()
  FlipBuffers():Delay(16)
Until KeyboardPushed(#PB_Key_Escape)

Re: [PB6.10LTS] Absolute ScaleEntity() does not work

Posted: Sun Apr 14, 2024 7:53 am
by Psychophanta
Psychophanta wrote: Wed Mar 06, 2024 1:44 pm ScaleEntity() with the '#PB_Absolute' should RESIZE the entity to the entered params.
To manage size in relation to the original creation entity size, #PB_Absolute and #PB_Relative flags, are enough.
However, to RESIZE an Entity (i.e., to manage its size disregarding the original size with which it was created) we need another combined flag, which could be called '#PB_ReSize' or '#PB_ReSet' or whatever. :o

Re: [PB6.10LTS] Absolute ScaleEntity() does not work

Posted: Sun Apr 14, 2024 7:59 am
by jacdelad
...which is not a bug, but a request.

Re: [PB6.10LTS] Absolute ScaleEntity() does not work

Posted: Sun Apr 14, 2024 8:04 am
by Psychophanta
I think yes, at least to have a powerful complete Scale functions :)
As the title says, absolute scale does not work now:
Just with the current status of the Scale commands, we really can not scale an entity to any given world units.