STrange effect with collision
Blitz3D Forums/Blitz3D Beginners Area/STrange effect with collision
| ||
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... |
| ||
Change the camera 'near' range to 0.01. It defaults to 1 - the same as its collision radius, hence the problem. |
| ||
Work good. Thank you! |
| ||
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. |
| ||
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. |
| ||
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. |
| ||
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. |