(AGK version: 2)
Submitted: 2014-06-05 00:10:44
// AGK Application

// set background color
setclearcolor (0,0,0)

// load images and set UV
// these images stored on media/bote folder
imageWood = loadImage("bote/Wood__Floor.jpg")
setimagewrapU(image1,1)
setimagewrapV(image1,1)

imageWater = loadImage("bote/Water_Pool.jpg")
setimagewrapU(image2,1)
setimagewrapV(image2,1)

// load a 3d mesh from /media folder
mesh1 = loadObject ("bote.obj")
setobjectimage (mesh1,imageWood,0)

// create a box
box1 = createobjectbox(1,1,1)
setobjectimage (box1,imageWater,0)

setobjectposition ( mesh1,3,0,2)
setobjectposition (box1, 0,0,0)

// position camera
movecameralocalZ (1,15)
RotateCameraGlobalY(1,10)
do
 // Move camera with key input
 if GetRawKeyState(38)=1 then MoveCameraLocalZ(1,0.5)
 if GetRawKeyState(40)=1 then MoveCameraLocalZ(1,-0.5)
 if GetRawKeyState(37)=1 then RotateCameraGlobalY(1,-0.5)
 if GetRawKeyState(39)=1 then RotateCameraGlobalY(1,0.5)

 // rotate objects
 an# = an#+0.1
 setobjectrotation (mesh1,an#,an#,0)
 setobjectrotation (box1,0,an#,an#)
 Sync()
loop
Help make AGK better by submitting an example for this command!
(All examples are subject to approval)
Login to post an example of your own.