(from another conversation, starting a new one since the name was not indicative)
> Yes, that would be quite useful. For the sliding (which also happens > on sloped ground, btw.), introducing friction somewhere in the > collision code could help. For the wall climbing, we'd need additional > checks whether jumping is allowed from the current position or not. > Right now it only checks if vertical velocity is zero (I believe), so > there are enough loopholes for actions that should be impossible. Friction indeed could be useful. I think we might also add some "terrain un-slide-able" (well, some better name) property, which will omit the sliding motion calculations when updating movable objects located on that terrain. As for jumping, it doesn't actually check the velocity. Doing so would faultlessly prevent wall climbing, but also disable jumping when the character is sliding down even the most gentle slope. Not something we want. I added a check to only jump when the character's jumping speed (VSpeed) is 0 (ie. no jumping before you actually stop the previous jump) and it helped a lot but climbing walls still occasionally happens. I think the main problem that needs to be solved is that when you walk up to a wall, the engine thinks that you are standing in that wall (GroundPos is set to the wall's top, and though z coordinate is not changed, it enables a lot abuse, I think). For example, if you attempt to jump where two wall objects are atop one another (like the doorway in wastesedge map), wall jumping will surely occur because you legitimately "landed" on the bottom section for a frame. I can't think of a trivial way of solving this (though I admit I didn't read the paper on the collision algorithm). I have one idea right now - some placeables could be marked as not being surfaces - that is, no movable is ever meant to be standing atop them. Objects marked as such would be ignored when calculating ground position. The only downside I can think of is that it introduces to the users a new option with no apparent relevance and is kind of like admitting "yeah, we couldn't figure it out ourselves, so do it for us". We could also try and detect if the collision is with a vertical surface and push the character further away (see veryCloseDistance at src/world/moving.cc:167). I tried to increase that value as it is now, but it has a side effect of making the character levitate above ground. I'm not sure if we can try to detect whether it's a wall automatically based on the amount of data about placeables we currently keep. The above mentioned properties (friction, etc.) I think could be placed in placeable_model - it already hold the string with the Terrain name, but that one seems to be meant to be used by python side. We could also create a c++ class for terrain information relevant to the engine. _______________________________________________ Adonthell-devel mailing list Adonthell-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/adonthell-devel