Any thoughts?
DBP
`Written by Patrick Lewis
`Set up sample world
Load Image "Cement_render.bmp",1
Sync On
Sync Rate 300
Set Global Collision On
Position Camera 0,0,-500
Make Matrix 1,1000,1000,40,40
Prepare Matrix Texture 1,1,1,1
Fill Matrix 1,0,1
For i = 0 to 39
Set Matrix Height 1,i,0,100
Set Matrix Height 1,0,i,100
Set Matrix Height 1,i,39,100
Set Matrix Height 1,39,i,100
Next i
For i = 5 to 35 step 6
For j = 5 to 35 step 4
h=rnd(99)+1
Set Matrix Height 1,i,j,h
Set Matrix Height 1,i+1,j,h
Set Matrix Height 1,i,j+1,h
Set Matrix Height 1,i+1,j+1,h
Next j
Next i
For i = 10 to 20
Make Object Box i,20,100,20
Position Object i, rnd(900)+50,50,rnd(900)+50
Texture Object i,1
Set Object Collision to Boxes i
Next i
Update Matrix 1
Make Object Cube 1,20
Make Object Sphere 2,0,1,1
Make Mesh From Object 1,2
Delete Object 2
Add Limb 1,1,1: ` Camera Limb
Hide Limb 1,1
Offset Limb 1,1,0,20,-50
Add Limb 1,2,1: ` Feeler Limb
Offset Limb 1,2,0,0,12
Hide Limb 1,2
Position Object 1,0,10,0
Make Object Cube 2,.5
Hide Object 2
Set Object Collision Off 1
`Sample object movement
Do
If LeftKey()=1 Then Turn Object Left 1,2
If RightKey()=1 Then Turn Object Right 1,2
If UpKey()=1 Then Move Object 1,1
Position Object 1,Object Position x(1),Get Ground Height(1,Object Position X(1),Object Position Z(1))+Object Size Y(1)/2,Object Position Z(1)
NoWalls(1)
Set Camera to Follow Limb Position X(1,1),Limb Position Y(1,1),Limb Position Z(1,1),0,0,0,10,1
Point Camera Object Position X(1),Object Position Y(1),Object Position Z(1)
Sync
Loop
`Written by Patrick Lewis
`Collision Sliding Function
Function NoWalls(ObjectID)
ClimbFactor# = 10
ObjectOffset# =Object Size Y(ObjectID)/2
For i = 0 to 350 step 10
Turn Object Left ObjectID,20
Height = Get Ground Height( 1,Limb Position X(ObjectID,2),Limb Position Z(ObjectID,2))-ClimbFactor#+ObjectOffset#
If Height> Object Position Y(ObjectID)
Move Object ObjectID,-1
Endif
Position Object 2,Limb Position X(ObjectID,2),Limb Position Y(ObjectID,2)+.1,Limb Position Z(ObjectID,2)
If Object Collision (2,0)>0
Move Object ObjectID,-1
Endif
Next i
EndFunction
"Droids don't rip your arms off when they lose." -H. Solo
REALITY II