HEEELP! My IF won't work!
I am trying to make a simple "camera floating" effect. When the camera's height reaches a certain level, it's supposed to come back down, but nothing's happenning. Here's my code
I am trying to make a simple "camera floating" effect. When the camera's height reaches a certain level, it's supposed to come back down, but nothing's happenning. Here's my code
Graphics3D 800,600 SetBuffer BackBuffer() cam = CreateCamera() PositionEntity cam,0,0.6,0 plane = CreatePlane() ptex = LoadTexture("bluesky2.bmp") ScaleTexture ptex,1200,1200 EntityTexture plane,ptex FreeTexture ptex gravity#=0.5 cam_grav#=-0.5 While Not KeyDown(1) MoveEntity cam,0,gravity#,0 If EntityY(cam,1)=100 Then gravity#=-0.5 UpdateWorld RenderWorld Text 0,0, Str(EntityY(cam)) Text 0,40,Str(gravity#) Flip Wend End