MY CAMERA WON'T MOVE!?!?!?
Blitz3D Forums/Blitz3D Beginners Area/MY CAMERA WON'T MOVE!?!?!?
| ||
here is the code... Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,1,0 CameraClsColor camera,92,236,222 ;camera2=CreateCamera() ;PositionEntity camera2,2,0,0 ;CameraClsColor camera2,92,236,22 light=CreateLight() ;CameraViewport camera,0,0,GraphicsWidth()/2,GraphicsHeight() ;CameraViewport camera2,GraphicsWidth()/2,0, GraphicsWidth()/2,GraphicsHeight() plane=CreatePlane() Ptex=LoadTexture("grass.jpg") EntityTexture plane,ptex While Not KeyDown(1) If KeyDown(208) Then MoveEntity camera,0,0,-1 If KeyDown(200) Then MoveEntity camera,0,0,1 RenderWorld Flip Wend End I just started and when I tried to move the camera, it didn't work... any help? EDIT: I found out the camera is moving, but no visual appearence shows that it is moving. I used Text 0,0,EntityX(camera,True) Text 0,15,EntityY(camera,True) Text 0,30,EntityZ(camera,True) to tell if the camera was moving and it was... EDIT: when I added a cube, it appeared the cube was moving and not the camera... |
| ||
..your camera is moving just fine..its just that PLANE you have been created is an infinite plane and therefore you cant notice any motion of your cam since horizon is same all time and you dont have any other objects on scene..here is your code with some cubes as environment so you can spot motion.. Graphics3D 640,480 SetBuffer BackBuffer() camera=CreateCamera() PositionEntity camera,0,10,0 CameraClsColor camera,92,236,222 ;camera2=CreateCamera() ;PositionEntity camera2,2,0,0 ;CameraClsColor camera2,92,236,22 light=CreateLight() ;CameraViewport camera,0,0,GraphicsWidth()/2,GraphicsHeight() ;CameraViewport camera2,GraphicsWidth()/2,0, GraphicsWidth()/2,GraphicsHeight() plane=CreatePlane() Ptex=LoadTexture("grass.jpg") EntityTexture plane,ptex ;create some environment For i=1 To 200 Cube=CreateCube() PositionEntity Cube,Rnd(-200,200),Rnd(1,10),Rnd(-200,200) EntityColor Cube,Rand(50,200),Rand(50,200),Rand(50,200) Next While Not KeyDown(1) If KeyDown(208) Then MoveEntity camera,0,0,-1 If KeyDown(200) Then MoveEntity camera,0,0,1 RenderWorld Flip Wend End |
| ||
but when I move in the Z direction over the plane, the plane doesn't blur to show motion,but when I go direction X, it shows the texture blur. This has not happened before... |
| ||
I figured out that if the amount it moves is <1 it will blur |