picking in viewport
Blitz3D Forums/Blitz3D Beginners Area/picking in viewport
| ||
I would like to have a viewport in the righthand side of the screen, how do i do that ? I can get 4 but i can't get just one in the righthand side (half of screen, half of height) Also, once i do that, picking doesn't seem to work anymore. I currently have: If PickedEntity()<>0 Then Text 0,12,"Object selected:" Text 130,12,EntityName(PickedEntity()) Any ideas? |
| ||
Have you written CameraPick(PX%,PY%) before the other lines ? Have you set the appropriate meshes/colliders as pickable ? with EntityPickMode(Mesh,2) If it doesn't work with several viewports, you can use linepick instead. |
| ||
Camera = createcamera() cameraviewport Camera, Graphicswidth()*.5, 0, graphicswidth()*.5,graphicsheight() If you are then using camerapick with the mouse coords, you will likely need to subtract the graphicswidth() away from mousex() to get the true coordinates for picking. |