(AGK version: 108.24)
Submitted: 2014-12-17 15:14:01
// this example should work with AGK V1 and V2


// make five spheres with increasing number of segments
// how many segments are needed for the sphere to look good?
// more segments = more polygons which could affect the performance of your game
for i = 1 to 5
	CreateObjectSphere(i,20,i*3,i*3)
	SetObjectPosition(i,(i-3)*25,0,0)
next i

// create a directional light (to make the scene look better)
CreateLightDirectional(1,-1,-1,1,255,255,255)

// position and orientate the camera
SetCameraPosition(1,0,0,-150)
SetCameraLookAt(1,0,0,0,0)

// main loop
do

	// rotate all the spheres
	for i = 1 to 5
		RotateObjectLocalY(i,1)
	next i

	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.