STrange effect with collision

Blitz3D Forums/Blitz3D Beginners Area/STrange effect with collision

Giulio(Posted 2004) [#1]
I put a camera in a mesh room created with maplet (b3d exported). I move camera (like a first person game) in the room with arrows and i set collision type between camera-room with:

Collisions type_camera,type_myroom,2,2

and radius of camera:

EntityRadius camera,1,1

But... When camera is near a wall the wall's texture disappear, and i can see trough it. What exactly happen? A solution is to increase the radius of camera, but with this trick i cannot walk in corridors...


GfK(Posted 2004) [#2]
Change the camera 'near' range to 0.01. It defaults to 1 - the same as its collision radius, hence the problem.


Giulio(Posted 2004) [#3]
Work good. Thank you!


Zethrax(Posted 2004) [#4]
It's best to keep the 'near' camera range as high as possible to prevent z-buffering issues, though, so fiddle around with it a bit to get it to the optimum point.


_PJ_(Posted 2004) [#5]
I thought it was just the near/far ratio that counts. As in: if you have a 0.1 Near value, don't make the high value more than 100 or so.


jhocking(Posted 2004) [#6]
That is correct, it's the ration that counts. It's fine to have a close near clipping plane so long as you also bring the far range as close as possible.


Zethrax(Posted 2004) [#7]
From what I've heard, the near range is far more important in affecting z-buffer performance than the far range though, because the z-buffer works logarithmically (?). That's my understanding of the situation, anyway, though I could be wrong.

If you fiddle with the near range so you're just short of the point where you get 'see-through' issues you should be ok, anyway, I'd think.