Does anyone have some code or even just pseudo-code of good collision checking for an FPS using Sparky's?
It should support:
- Horizontal AND Vertical movement.
- Jumping (Hitting ceiling and landing on ground)
- Crouching
- Ramps AND stairs.
- Blocking the un-crouching when there's a wall above you.
I have been playing around with it all weekend and have gotten it to a somewhat functional status. BUT there are alot of "bugs" where in special cases it will do strange things, like going through the ceiling, or there will be alot of "flickering"-movement.
I have included what I've been working on in the attachment if you want a look.
CONTROLS: WASD Movement, MouseLook, CTRL = Crouch, SPACE = Jump, Left-SHIFT = Run.
EDIT: Tried to make a short video of the bugs but it seems the gravity is messed up when the FPS changes, probably because of some Timing issues. So if you experience very slow falling, etc... That's why...