POINTENTITY
Blitz3D Forums/Blitz3D Programming/POINTENTITY
| ||
How to stop it? I mean, I apply PointEntity MyCamera,Wall, and then I want MyCamera bee free from an pointing on to Wall entity? How? |
| ||
Not sure if you mean what I think you mean, but if you don't call pointentity then it won't point at it and will therefore be "free from any pointing". Here is some code to demonstrate. Graphics3D 640,480 SetBuffer BackBuffer() cone=CreateCone() RotateMesh cone,90,0,0 cube=CreateCube() point=True camera=CreateCamera() PositionEntity camera,0,20,0 PointEntity camera,cone While Not KeyDown(1) If KeyHit(57) Then point=point*-1 If point=True Then PointEntity cone,cube If KeyDown(200) Then MoveEntity cube,0,0,.25 If KeyDown(208) Then MoveEntity cube,0,0,-.25 If KeyDown(203) Then MoveEntity cube,-.25,0,0 If KeyDown(205) Then MoveEntity cube,.25,0,0 UpdateWorld RenderWorld Text 0,0,"use arrows to move cube, press space to toggle pointing" Flip Wend End |
| ||
maybe befor you use point entity, create a pivot just infront of where you are looking now then after pointing at the wall, use point entity again this time at the pivot. I am not sure that would work, as i am not very experienced but it sounds like it would, anyone else? |
| ||
Wild guess: take it out of the loop ? |
| ||
I'm not sure what you mean here. If you point your camera at the wall, it will simply rotate the camera to face the wall once. Unless you repeated call it. |
| ||
I think he means he wants to have like a keyhit that focuses his camera on a wall, then another command to move the camera back to where it was pointing before he called pointentity. Am i right about this? |
| ||
If so, store initial camera rotation in 3 float variables using EntityPitch(), EntityYay(), and EntityRoll() |
| ||
*slaps myself silly* thats a much better way. Thanks you mr. pickelsworth, |
| ||
If KeyHit(57) Then Point=(1-Point) |