MagicManICT wrote:It's actually all pretty well all figured out. There's quite a few 3D programming books with the calculations, though you do need to have a grasp of the math to be able to program it without significant bugs. Otherwise, you pretty much described the algorithms used to move two potentially intersecting objects if one is trying to "push through" the other.
I've always seen it called "sliding" the objects, but language varies in different regions.
The big problem with the current design, I think, and the way people cram stuff together off-grid is that with any sliding algorithm, you end up potentially still stuck in a corner with no way to get around it. In a typical WASD movement game, the person can usually just sidestep left or right to get off the concave corner (convex corners/curves won't, or shouldn't, ever be an issue). In point-and-click (Haven), there does need to be some smart way for the user to get out of that sort of corner without moving the mouse back behind or to the appropriate side of the avatar model for a quick side step. On the other hand, if it's at a wall or cliff where the corner is more than an integral or two (say half a tile or more), yes, they should have to manually move out of the corner.
3D engine design is a complex beast. It's why we've come down to about 4 major engines (Unreal, Source, CryTek, Unity, maybe missing one or two) and a half dozen or so minor ones.
Haven & Hearth is not 3D, if you know what I mean. At least in this respect, it doesn't seem like it would matter.
Sliding is a much better word, and pathing around those crammed-in jagged corners is exactly what I was talking about, but the only way you can path around them is to find the corner that's going to block the character and start moving along a line that doesn't hit it. I think that's the real problem, and if you can't do that then I don't think it's really possible, because if you use the FPS kind of sliding, when you run yourself into a badly lined up wall/corner, you
do get stuck.
I guess in that sense, sliding/push-off of a single hitbox and making sure that many in a straight line will not catch you up on tiny bumps is probably the best solution without creating an expensive, buggy function.