Hi to all,
here comes a little Update, but only for x86, PB 5.11 and 5.24 and greater:
1) I think the installer file has had a bug and installed the wrong version. I hope i found the bug and this new installer works fine. Please test it:
To install only the lib please choose "MP3DLib only"
http://www.flasharts.de/mpz/mp33_beta/M ... taller.exe
2) Two new commands are ready, i need them for a shader -> see Demo
MP_CreateCubeTexture(Size(,Miplevel)) -> Create empty six side cube texture
MP_CopyTexturetoCubeTexture (Texture,Texture2[,side]) -> copy a texture to all or one side of a cube textur
Shaderdemo
http://www.flasharts.de/mpz/mp33_beta/Shaderdemo.exe
3) I have MP_Lookat(Camera...) actualiced. I think this works now correct. Please test it
Code: Select all
MP_Graphics3D(640,480,0,3)
camera=MP_CreateCamera()
MP_PositionEntity(camera,0,0,0)
Debug "Camera Pitch/Yaw/Roll"
Debug MP_EntityGetPitch(camera)
Debug MP_EntityGetYaw(camera)
Debug MP_EntityGetRoll(camera)
MP_EntityLookAt(camera,0,0,3) ; <- Un-remark this line to see what happens
Debug "Camera Pitch/Yaw/Roll after lookat"
Debug MP_EntityGetPitch(camera)
Debug MP_EntityGetYaw(camera)
Debug MP_EntityGetRoll(camera)
light=MP_CreateLight(1)
mesh=MP_CreateCube()
MP_PositionEntity(Mesh,0,0,3)
While MP_KeyUp(#PB_Key_Escape) And WindowEvent()
<>#PB_Event_CloseWindow
If MP_KeyDown(#PB_Key_Right):MP_MoveEntity(camera,0.01,0,0)
ElseIf MP_KeyDown(#PB_Key_Left):MP_MoveEntity(camera,-0.01,0,0)
ElseIf MP_KeyDown(#PB_Key_Up):MP_MoveEntity(camera,0,0.01,0)
ElseIf MP_KeyDown(#PB_Key_Down):MP_MoveEntity(camera,0,-0.01,0)
ElseIf MP_KeyDown(#PB_Key_A):MP_MoveEntity(camera,0,0,0.01)
ElseIf MP_KeyDown(#PB_Key_Z):MP_MoveEntity(camera,0,0,-0.01)
EndIf
MP_RenderWorld()
MP_Flip()
Wend
Now the next case:
@N_Gnom i am sorry to hear this. Okay what can we do to make it better? I will have more time in the next weeks an can work on mp3d
- If anybody find a bug or whant to have a function please write here a message with problem or error message and a testcode. Please only one case per message
* I will check this and make an answer. Somtimes a wish is not possible to create but i do my best
@Psychophanta
* "Move an entity relative to its current position and orientation" is not needed because the command MP_MoveEntity(..) do this
Code: Select all
MP_Graphics3D(640,480,0,3)
camera=MP_CreateCamera()
MP_PositionEntity(camera,0,0,0)
light=MP_CreateLight(1)
mesh=MP_CreateCube()
MP_PositionEntity(Mesh,0,0,3)
MP_TurnEntity(Mesh, 0, 0,45)
While MP_KeyUp(#PB_Key_Escape) And WindowEvent()<>#PB_Event_CloseWindow
If MP_KeyDown(#PB_Key_Right):MP_MoveEntity(Mesh,0.01,0,0)
ElseIf MP_KeyDown(#PB_Key_Left):MP_MoveEntity(Mesh,-0.01,0,0)
ElseIf MP_KeyDown(#PB_Key_Up):MP_MoveEntity(Mesh,0,0.01,0)
ElseIf MP_KeyDown(#PB_Key_Down):MP_MoveEntity(Mesh,0,-0.01,0)
EndIf
MP_TurnEntity(Mesh, 0, 0,0.1)
MP_RenderWorld()
MP_Flip()
Wend
* MP_RotateMesh() is not needed because i have made the command MP_ChangeMeshCoord(Entity). This function is better. You can make a
rotation and change the position of the vertices. Please have a look on the demofile "MP_Spikes.pb".
i hope this helps
Greetings Michael