Better player movement collisions

Feedback on past, current, and future development.
Ott
Posts: 1
Joined: 29 Dec 2016, 17:34

Better player movement collisions

Post by Ott »

I keep getting put off by how badly the movement system handles collisions. It's impossible to slide along a wall and not get stuck on some random polygon. Jumping on a slope is also inconsistent. I'd like to see a more robust movement system implemented, like the Source and GoldSrc engines do it.

Here's the source code for Source movement: https://github.com/ValveSoftware/source ... vement.cpp
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Better player movement collisions

Post by wareya »

The majority of the Source Engine movement solver is closely tied to the "game logic" of source's movement. Nothing can be directly learned from it.

As far as movement solvers go, there's really only one approach that works. Source uses it partially. That approach is to move the object until it has to interact with the world, then interact it with the world, then check if it needs to keep moving and repeat. And you short-circuit this after something like eight "bounces" for the sake of performance.

I don't know if OpenMW has such a correct contact based movement solver, but judging by recent performance bug reports, I would assume that it has a bug or design problem somewhere if it's doing it properly. For example, some games do this, but you should never use binary searches in the "move the object against what it collides against" part of the movement solver. You can represent all collisions of AABBs against points, lines, AABBs, and triangles as very simple closed form functions, so there's no need.

Morrowind gets you stuck on walls because the collision is janky.
User avatar
psi29a
Posts: 5357
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Better player movement collisions

Post by psi29a »

User avatar
raevol
Posts: 3093
Joined: 07 Aug 2011, 01:12
Location: Caldera

Re: Better player movement collisions

Post by raevol »

psi29a wrote:Being worked on already: https://github.com/OpenMW/openmw/pull/1158 :)
Yow this is awesome.
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Better player movement collisions

Post by lysol »

Who is this Logzero guy? Does he have a forum account too? I saw this PR before in a thread about solving the physics loop bug. He seems like a great guy. ;)
CMAugust
Posts: 285
Joined: 10 Jan 2016, 00:13

Re: Better player movement collisions

Post by CMAugust »

I've been keeping an eye on his pull request for weeks. I was so excited to see it merged that I grabbed Ace's nightly build as soon as it updated hours later. No question about it - HUGE improvement. :D In fact, sliding against certain objects is now even better than vanilla in some cases. And this is merely a side effect of the main attraction, which is the big performance improvements to physics. If 0.42.0 has nothing else, it will be worth it for this pull alone. Three cheers for logzero!
User avatar
psi29a
Posts: 5357
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Better player movement collisions

Post by psi29a »

Test and let us know. :D
User avatar
Atahualpa
Posts: 1176
Joined: 09 Feb 2016, 20:03

Re: Better player movement collisions

Post by Atahualpa »

Unfortunately, I wasn't able to reproduce these issues with my setup. That's why I'm asking. :roll:
User avatar
lysol
Posts: 1513
Joined: 26 Mar 2013, 01:48
Location: Sweden

Re: Better player movement collisions

Post by lysol »

This is so great news.
Post Reply