Edit to this post: The template provided on this first post only provides a c_move workaround script and not the "better c_move" mentioned in the title of this thread. See my post below (containing the player_move() function) for the code snippet you probably came here for.

*****************

I've seen a number of rants on this forum about the OBB collision system that's been forced on us since A6.40, and having had insane amounts of trouble with collision under any settings myself, I've come up with a solution for simple games.

I created a simple c_trace-based collision detection system for first-person games. Simple is the key word here - it allows climbing of steps and slopes, but Z movement is otherwise restricted (there's no gravity and no jumping). The system is also a little glitchy at the moment (but certainly better than what I've done with the new c_move), but I'm sure someone could check that out if there's enough interest in this project.

I wrapped up the collision system inside a well-documented template for adventure/stealth/horror games (inspired by Amnesia: The Dark Descent). It includes the following features:

-Movement. Obviously. Player and camera movement are smoothed and feel professional as far as I can see.
-Crouching (with un-crouch collision detection/avoidance)
-Leaning around corners
-Displaying short messages on the screen
-Interaction with level objects - tiny center dot turns to a hand in one of two positions depending on how you interact with an object
-Player's visibility is tracked, and can be passed to monster scripts so that the player can hide in the shadows.

It can be downloaded here:
http://www.mediafire.com/file/v42eclp7mz21mu7/XYhalfZCollision.rar

Does anyone find this helpful? Should I add or fix anything before I drop this into the user contributions board?

Last edited by MatAllum; 03/06/12 18:48.