mnm23
16-09-2006 04:49:06
Hey guys. Hows it going. Im trying to use ray casting to block my camera from going through the walls. No luck so far. Basically what i want to do is, have the camera get close to the wall and if the player is still turing or moving closer to the wall where the camera would normally go through the wall instead it would move closer to the player along the z-axis. I have used ray casting before, but only for the y-axis. I have gone through the forum and tried to manipulate some of the examples so i could use it for the z-axis but no luck so far. The ray doesnt even detect any of the walls when i change the code to the y-axis it seems to work fine. Can anyone give me any suggestions on how I can fix this. Thanks much appreciated.