closion !?

Blitz3D Forums/Blitz3D Beginners Area/closion !?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Graphics3D 800,600
cube=CreateCube()
sphere = CreateSphere()
camera=CreateCamera()
light = CreateLight()
PositionEntity camera,0,2,-10
PositionEntity sphere,0,6,0
EntityType cube,1
EntityType sphere,2
Collisions 2,1,2,1

gravity# = -0.01
vspeed# = 0

While Not KeyDown(1)
	vspeed = vspeed + gravity
	TranslateEntity sphere,0,vspeed,0
	UpdateWorld()
	If CountCollisions(sphere)
		vspeed = Abs(vspeed)
	EndIf
	RenderWorld()
	Flip
Wend