I've been looking at some examples where "Locate" was used in some commands for positioning elements in the 3D scene, these examples to put a positive value on any item, for example the camera was moving forward now to put positive numbers the move command, the object goes backwards.
Am I missing something?
Coordinates in the Z axis
Coordinates in the Z axis
Iris3D -Games Studios- http://www.iris3dgames.com
Re: Coordinates in the Z axis
What example code were you looking at? I not entirely sure of the problem, but some code might help clear things up for me.
Also since Purebasic 5.1 the "Locate" commands have all been replaced by the #PB_Absolute flag in the Move commands.
One more thing for future reference you may want to post your 3D questions in the 3D programming section.
It's makes it easier for us to find and answer your 3D questions.
http://www.purebasic.fr/english/viewforum.php?f=36
Also since Purebasic 5.1 the "Locate" commands have all been replaced by the #PB_Absolute flag in the Move commands.
One more thing for future reference you may want to post your 3D questions in the 3D programming section.
It's makes it easier for us to find and answer your 3D questions.

http://www.purebasic.fr/english/viewforum.php?f=36
Re: Coordinates in the Z axis
Thanks for your response and will pass 3D forums.Samuel wrote:What example code were you looking at? I not entirely sure of the problem, but some code might help clear things up for me.
Also since Purebasic 5.1 the "Locate" commands have all been replaced by the #PB_Absolute flag in the Move commands.
One more thing for future reference you may want to post your 3D questions in the 3D programming section.
It's makes it easier for us to find and answer your 3D questions.![]()
http://www.purebasic.fr/english/viewforum.php?f=36

Just have a doubt about the z axis, increasing positive values bucket moves backward from the point of view of the camera, something that bothered me, in the examples locate by putting positive values such as nature walks away from the camera.
Code: Select all
- Includes
IncludePath "Includes I" ; - Ruta Includes I
XIncludeFile "Variables.pb" ; - Fichero Variables.pb
XIncludeFile "Procedimientos.pb" ; - Fichero Procedimientos.pb
Enumeration Elementos
#ID_Camara
#ID_Luz
#ID_Cubo
#ID_Caja
#ID_MaterialCaja
EndEnumeration
If InitSistemas()
If InitVentana3D(tituloAPP.s)
Add3DArchive("Data/Sky.zip", #PB_3DArchive_Zip)
Add3DArchive("Data", #PB_3DArchive_FileSystem)
Parse3DScripts()
CreateCamera(#ID_Camara,0,0,100,100)
MoveCamera(#ID_Camara,0,0,5,#PB_Absolute) ; 5 back camera ??? Front move camera number positive.
CreateLight(#ID_Luz,RGB(255,255,255),0,0,0,#PB_Light_Directional)
GetScriptMaterial(#ID_MaterialCaja,"Caja/Madera")
CreateCube(#ID_Cubo,1)
CreateEntity(#ID_Caja,MeshID(#ID_Cubo),MaterialID(#ID_MaterialCaja))
SkyBox("sky2.JPG")
Repeat
ExamineKeyboard()
Eventos3D = WindowEvent()
RenderWorld()
FlipBuffers()
RotateEntity(#ID_Caja,1,1,1,#PB_Relative)
Until Eventos3D = #PB_Event_CloseWindow Or KeyboardReleased(#PB_Key_Escape)
Else
MessageBox_(#Null, "Error Número : [ 00001 ]" + Chr(13) + "=========================" + Chr(13) +
"Error al Iniciar entorno Ventanas." + Chr(13) + "=========================" ,
"¡Atención!" ,#MB_ICONERROR)
End
EndIf
Else
; Errores al Iniciar sistemas.
MessageBox_(#Null, "Error Número : [ 00000 ]" + Chr(13) + "=========================" + Chr(13) +
"Error al Iniciar Sistemas de entorno 3D." + Chr(13) + "=========================" ,
"¡Atención!" ,#MB_ICONERROR)
End
EndIf
Iris3D -Games Studios- http://www.iris3dgames.com