Nope I didn't, and honestly don't have the time right now... The deadline is next week monday, and if this (dirty) hack fixes it, then I'm happy. Oh by the way, it could as well be ogrenewt and not newton, who knows.
Edit:
What I think was the error is the following case: normally I only had this test
- Code: Select all
// Calculate movement force (for avatar control)
if (av->m_direction != eDirNone) {
so that I only add forces when the user is pressing a button to move in a certain direction.
What somehow happend (I think) is that the tempX/Z calculation bit went wrong making the function apply enormous forces on the avatar at each timestep, resulting in very high (go through walls) speeds
The bit that fixed it is changing the if test to this:
- Code: Select all
// Calculate movement force (for avatar control)
if (av->m_direction != eDirNone && vel.length() < m_MaxRunSpeed) {
With this new test, I don't add new movement forces when the avatar reaches it's max speed.
Now for security reasons (as in: I don't want this happening during demos), I added a test before that that checks the speed to twice the max speed. If it's above that, cap it.