I am having a problem figuring out how to "walk" a cube across a plane, so that it properly moves on its edges without them sinking into the ground, yet doesn't float above the ground when it is level. I hope this makes sense! Here is some code that will hopefully illustrate my problem; any help would be very much appreciated!
Graphics3D 800,600 SetBuffer BackBuffer() AmbientLight 255,255,255 camera=CreateCamera() PositionEntity camera,0,1,0 plane = CreatePlane() EntityColor plane,0,128,0 EntityType plane,2 cube = CreateCube() EntityColor cube,0,0,128 PositionEntity cube,6,1,8 EntityType cube,1 Collisions 1,2,2,2 While Not KeyHit(1) ; move cube up and down to test collision with plane If KeyDown(200) Then TranslateEntity cube,0,0.1,0 If KeyDown(208) Then TranslateEntity cube,0,-0.1,0 ; move cube from right to left whilst turning it TranslateEntity cube,-0.01,0,0 TurnEntity cube,0,0,0.3 ; this line just for test collision, I don't want the cube to be aligned with the plane If EntityCollided(cube,2) Then AlignToVector cube,CollisionNX(cube,1),CollisionNY(cube,1),CollisionNZ(cube,1),2 UpdateWorld() RenderWorld() Flip Wend End