Doesn't work Scale Node (5.30)

All bugs related to the 3D engine
maslobojik
User
User
Posts: 36
Joined: Thu Jul 11, 2013 11:17 pm

Doesn't work Scale Node (5.30)

Post by maslobojik »

Doesn't work Scale Node in PureBasic 5.30

Code: Select all

InitEngine3D()
InitSprite()

OpenWindow(0,0,0,1000,700,"")
OpenWindowedScreen(WindowID(0),0,0,1000,700,0,0,0,#PB_Screen_NoSynchronization)

CreateCube(0,1)

CreateEntity(0,MeshID(0),#PB_Material_None) : ScaleEntity(0,10,1,1)
CreateEntity(1,MeshID(0),#PB_Material_None) : ScaleEntity(1,1,10,1)
CreateEntity(2,MeshID(0),#PB_Material_None) : ScaleEntity(2,1,1,10)

CreateNode(0)
AttachNodeObject(0,EntityID(0))
AttachNodeObject(0,EntityID(1))
AttachNodeObject(0,EntityID(2))

CreateCamera(0,0,0,100,100) : MoveCamera(0,10,0,30)
CameraLookAt(0,NodeX(0),NodeY(0),NodeZ(0))

CreateLight(0,#White,-30,30,30)

timer=0
Repeat
  WindowEvent()
  
  timer+1
  If timer>1000
    timer=0 : num.f=Random(100,1)/8
    ScaleNode(0,num,num,num,#PB_Absolute)
    Debug num
  EndIf
  
  RenderWorld()
  FlipBuffers()
  Delay(1)
ForEver
User avatar
STARGÅTE
Addict
Addict
Posts: 2085
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: Doesn't work Scale Node (5.30)

Post by STARGÅTE »

Node scaling is only for the object position in the node, not for the scaling of objects.

See this:

Code: Select all

InitEngine3D()
InitSprite()

OpenWindow(0,0,0,1000,700,"")
OpenWindowedScreen(WindowID(0),0,0,1000,700,0,0,0,#PB_Screen_NoSynchronization)

CreateCube(0,1)

CreateEntity(0,MeshID(0),#PB_Material_None) : ScaleEntity(0,1,10,1)
CreateEntity(1,MeshID(0),#PB_Material_None, 1, 0, 0) : ScaleEntity(1,1,10,1)
CreateEntity(2,MeshID(0),#PB_Material_None) : ScaleEntity(2,1,1,10)

CreateNode(0)
AttachNodeObject(0,EntityID(0))
AttachNodeObject(0,EntityID(1))
AttachNodeObject(0,EntityID(2))

CreateCamera(0,0,0,100,100) : MoveCamera(0,10,0,30)
CameraLookAt(0,NodeX(0),NodeY(0),NodeZ(0))

CreateLight(0,#White,-30,30,30)

timer=0
Repeat
  WindowEvent()
  
  timer+1
  If timer>1000
    timer=0 : num.f=Random(100,1)/8
    ScaleNode(0,num,num,num,#PB_Absolute)
    Debug num
  EndIf
  
  RenderWorld()
  FlipBuffers()
  Delay(1)
ForEver
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
maslobojik
User
User
Posts: 36
Joined: Thu Jul 11, 2013 11:17 pm

Re: Doesn't work Scale Node (5.30)

Post by maslobojik »

STARGÅTE wrote:Node scaling is only for the object position in the node, not for the scaling of objects.
But scaling of objects in Node worked in early PureBasic versions.
User avatar
Comtois
Addict
Addict
Posts: 1429
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: Doesn't work Scale Node (5.30)

Post by Comtois »

you are right, InheritScale worked in early PureBasic versions.

It's not really a bug but a 'Feature Requests and Wishlists'.

TODO : Add #PB_Entity_InheritScale for SetEntityAttribute()
Please correct my english
http://purebasic.developpez.com/
m0
New User
New User
Posts: 8
Joined: Thu Nov 22, 2007 3:38 pm
Location: DE

Re: Doesn't work Scale Node (5.30)

Post by m0 »

Hi,
Am I missing something, or is this feature still missing after six years now??
Post Reply