I don't have the actual code snippet right now, but I can give you the description of what's going on. I am creating static collision boxes bordering a 10,000 by 10,000 matrix. The 200 by 200 static collision boxes are created (for example) with the following code:
for x = 1 to 50
for z = 1 to 50
cx = (x * 200) - 200
cz = (x * 200) - 200
cy = get ground height(1,cx,cz)
statx = cx + 100
statz = cz + 100
staty = get ground height(1,statx,statz)
`here I create a static cone and place it at cx,cy,cz
`here I create the static collision box
make static collision box (statx - 100),staty,(statz - 100),(statx + 100),(staty + 200),(statz + 100)
next z
next x
I believe the problem is in my check for static collision:
if get object static collision(oldx-100,oldy,oldz-100,oldx+100,oldy,oldz+100,newx-100,newy,newz-100,newx+100,newy,newz+100)
` insert sliding collision logic
endif
The oldx,oldy,oldz values are being formatted correctly as are the newx,newy,newz values. On two of the four borders, this logic works fine. On the other two borders, I can not come within 100 world units of the boxes. The static collion boxes that end in zvlaue 400, my character stops at zvalue 500 (for example).
I realize this may be difficult without the actual code from my program. Can anyone be of some help?