How to reduce the jitter problem when the character controller moves along uneven wall surface or at coners?

Started by
31 comments, last by Gnollrunner 1 year, 3 months ago

the reflection direction results tend to bounce between the surfaces for a short period of time and cause the character to jitter.

huh

number of “bounces” should not be larger than number of walls the player walks in simultaneousl;y

None

Advertisement

Notice the ‘clip twice’ approach fails if the angle is less than 90 degrees, see the second picture.

If you have adjacency information for the geometry, a single step solution is possible, e.g. by finding the voronoi region the point is in. In this case the region would be the vertex of the corner, so we would snap to that and be fine.

If you don't have it, some iterative solution is needed, which may fail to project the point to the surface after finite number of steps, but may be good enough.

Another idea would be to find the closest points on the intersecting faces, and using some average of them.

Edit: Or better, pick the closest point which has the shortest distance to the initial point (t0). That's good actually, because it gives us the precise solution in one step.

Though, remember that determining if the query point is in solid or empty space at all is no trivial problem either. That's a problem a sweeping / tracing method gracefully avoids.
One option is (or was) to use BSP trees like in Quake. This made it possible to query if a point is solid or empty by traversing the tree.
But for modern standards of detail BSP is no longer practical. The fastest method i know supporting polygon soup requires to iterate all polygons and integrating form factor to the point. If the point ‘sees’ more back faces than front faces, it's in solid space. Contrary to former methods based on ray sampling, this method does not require expensive visibility, but it's still expensive without any LOD for the geometry.

But just to mention. It really depends on your geometry what's your practical options and what problems to expect.

Because of fast moving objects and variable terrain, you always have to iterate until either your movement vector is used up or you hit a dead end. This isn't even a complex case. It takes like three or four iterations depending on whether it hits the first slope.

Didn't read the whole thread (sorry) but you could track the time and pushback directions of the last reflected vectors. If you have two collisions that are dot product greater than one, then you have detected you are in the original V shaped corner you posted. You could then just stop all character movement until the players forward vector is also a > 0 dot product, meaning that he is now facing away from the tip of the v corner.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

teniie0 said:

I ran into a similar issue. What I ultimately did was put the idea of "touching" a surface into practise. I'm going to assume you are using a sphere for the purposes of this discussion, although a capsule also works. In order to specify when you are just contacting geometry, I also have a somewhat bigger sphere in addition to the collision sphere. I keep a record of everything you've touched, and I add that thing to the list.

Gnollrunner said:

I had a similar problem. What I ended up doing is implementing the concept of “touching” a surface. For the purposes of this explanation, I'm going to assume you are using a sphere, but it works the same with a capsule. So, in addition to the collision sphere, I have a slightly larger sphere that defines when you are simply touching geometry. When you are touching something, I add it to a list of touching objects.

Did you manually modify it, or use some AI tool? In either case, why did you bother? Just trolling? Or perhaps you are just a bot.

This topic is closed to new replies.

Advertisement