@Caleb1994
I plan on adding an example of sliding collision to my terrain collision examples, but until I do maybe this info will help.
How sliding collision works is by checking for collision in multiple directions and only adjusting your position according to the direction that is being collided with. The easiest implementation is to check for collision along the z axis anf the x axis of the object or the camera. In the case of Sparky's DLL and first person perspective, you would cast 4 rays all starting from the camera position to the front, to the back, to the left, and to the right. These rays will always be aligned to the world X and Z axes. That means if you could see the rays, wherever the camera was would be a plus sign + .
In this method, the rays don't rotate but are always aligned with the workd x and z. The start position is always from the camera position and the end position is the camera position and some distance from the camera. For example, if I want to cast the forward ray 30 units, that would be +30 on the z axis so if the camera position was (20,10,100) then the end of the ray would be (20,10,130). What about the ray cast to back? Well, that's -30 on the z axis so the end position would be (20,10,70). Left and right?
(-10,10,100) and (50,10,100). Get it?
Now, we test each of these four rays for collision. If there is collision with a particular ray, we move the camera 30 units in the opposite direction from the position that the ray hits. For example, if we are testing the left ray, and it collides with the environment, we retrieve the position where the ray is colliding using getStaticCollisionX() and ADD 30 to that position and move the camera to that position keeping the cameras current Z and Y. We ADD 30 in this case because remeber if we cast the ray to the left or rather, the -x axis, we originally subtract 30 from the camera x to get the end of the ray. If we have collision in that direction, we have to move the opposite way away from the collision so there isn't any more collision.
If you test in each of the 4 directions, then when you collide with x, the Z camera position is still being updated so you would slide along z. If z is colliding then the X position is still being udated so you would slide along x. This works very well for nice rectangular or square environments but may cause a jumping effect when hitting walls and such at 45 degree angles.
Ray casting is great for shooting weapons or testing line of sight. It's not great for collision detection between objects because there is a lot of empty space that the ray does not cover. You can use it for object to object collision and for ground height and environmental collision, but it's very difficult to account for all the posibilities of where collision may occur between objects.
The main key here with strafing and movement in general is not to rotate the ray in whatever direction the camera is facing or moving but to have a set of rays that are cast in set directions.
Enjoy your day.