Roll() with #PB_World does not roll at world

Everything related to 3D programming
User avatar
Psychophanta
Addict
Addict
Posts: 4968
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Roll() with #PB_World does not roll at world

Post by Psychophanta »

Test yourself.
Roll() function is not making a world roll.

Code: Select all

InitEngine3D()
InitSprite():InitKeyboard():InitMouse()
OpenWindow(0,0,0,800,600,"tip",#PB_Window_BorderLess|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,800,600,0,0,0,#PB_Screen_WaitSynchronization)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Textures", #PB_3DArchive_FileSystem)
CreateLight(0,$EEEEEE,4,4,2,#PB_Light_Point)
CreateMaterial(0,LoadTexture(0,"soil_wall.jpg"))
CreateCylinder(0,0.1,2,6,1,1)
CreateEntity(0,MeshID(0),MaterialID(0),-0.256,0.488,0)
CreateCamera(0,0,0,100,100):CameraProjectionMode(0,#PB_Camera_Perspective)
MoveCamera(0,0,0,12,#PB_Absolute)
Roll(0,90,#PB_World); <--- ????
Repeat
  WindowEvent()
  ExamineKeyboard()
  RenderWorld()
  FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)

http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 280
Joined: Thu Jul 09, 2015 9:07 am

Re: Roll() with #PB_World does not roll at world

Post by pf shadoko »

Roll(CameraID(0),90,#PB_World)
User avatar
Psychophanta
Addict
Addict
Posts: 4968
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: Roll() with #PB_World does not roll at world

Post by Psychophanta »

pf shadoko wrote: Tue Apr 20, 2021 3:38 pm Roll(CameraID(0),90,#PB_World)

Roll(EntityID(0),90,#PB_World)

does not rotate entity in the Z world reference, which is intended for "roll".

NOTICE: at first post the correct was Roll(EntityID(0),90,#PB_World) instead of Roll(0,90,#PB_World)
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
User avatar
pf shadoko
Enthusiast
Enthusiast
Posts: 280
Joined: Thu Jul 09, 2015 9:07 am

Re: Roll() with #PB_World does not roll at world

Post by pf shadoko »

i will look

to get a better idea :

Code: Select all

InitEngine3D()
InitSprite():InitKeyboard():InitMouse()
OpenWindow(0,0,0,800,600,"tip",#PB_Window_BorderLess|#PB_Window_ScreenCentered)
OpenWindowedScreen(WindowID(0),0,0,800,600,0,0,0,#PB_Screen_WaitSynchronization)
Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Textures", #PB_3DArchive_FileSystem)
CreateLight(0,$EEEEEE,4,4,2,#PB_Light_Point)
CreateMaterial(0,LoadTexture(0,"soil_wall.jpg"))
CreateCylinder(0,0.1,2,6,1,1)
CreateEntity(0,MeshID(0),MaterialID(0))
CreateCamera(0,0,0,100,100);:CameraProjectionMode(0,#PB_Camera_Perspective)
MoveCamera(0,5,5,5,#PB_Absolute)
CameraLookAt(0,0,0.1,0)
;Roll(EntityID(0),90,#PB_World); <--- ????
RotateEntity(0,0,0,90,#PB_Absolute)
	CreateLine3D(100,-1000,0,0,$0000ff,1000,0,0,$0000ff)
	CreateLine3D(101,0,-1000,0,$00ff00,0,1000,0,$00ff00)
	CreateLine3D(102,0,0,-1000,$ff0000,0,0,1000,$ff0000)
Repeat
  WindowEvent()
  ExamineKeyboard()
  RenderWorld()
  FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
User avatar
Psychophanta
Addict
Addict
Posts: 4968
Joined: Wed Jun 11, 2003 9:33 pm
Location: Lípetsk, Russian Federation
Contact:

Re: Roll() with #PB_World does not roll at world

Post by Psychophanta »

Dear pf shadoko, of course I am using RotateEntity() instead, but this does not avoid this issue to continue.
http://www.zeitgeistmovie.com

While world=business:world+mafia:Wend
Will never leave this forum until the absolute bugfree PB :mrgreen:
Post Reply