Capsule can slide up certain walls and boxes

106 views
Skip to first unread message

mid

unread,
Oct 14, 2022, 7:13:15 AM10/14/22
to ode-...@googlegroups.com
Hello, all. I'll try to condense this to the bare minimum, but prepare for a doozy.

My character is an up-right capsule. The capsule is made to walk with continual calls to dBodySetLinearVel (the Y coordinate is unchanged for gravity).

However, if this capsule walks into any box geometry, or any short trimesh wall, or any tall trimesh wall at any angle over 90 degrees, it begins to climb upward.

All of my contacts have mode dContactApprox1 and a mu of 1. My time step is 1/20s.

Things that don't work:
* Increasing mu
* Decreasing the time step
* Decreasing walking speed
* Moving the capsule using forces

Removing dContactApprox1 works but causes all bodies to move in a jumpy manner, and they even phase through the level geometry if pushing on it for long enough. Here, decreasing the time step appears to fix that, but 1/100s seems needlessly inefficient. Without dContactApprox1 ODE also spams my console with LCP internal errors.

Adding dContactSlip1 | dContactSlip2 works but causes other unwanted behaviour.

Making the character a box or a cylinder seems to fix the issue, but then it bounces around as it walks, giving a very bad user experience.

I complain about all of my above solutions, because they appear to only fix the symptom, not the real issue at hand.

I thought this would be a very common problem, but I could not find anything. Help will be appreciated. Hoping someone with an intuition can snap toward the bug. I can attach a video showcasing the behaviour.

Thank you for reading.

Sent with Proton Mail secure email.

mid

unread,
Oct 22, 2022, 11:15:32 AM10/22/22
to ode-...@googlegroups.com
As an update and a word for future visitors, I have come to a certain compromise, that gives okay-ish results.

The quasi-fix is a tick rate of 50Hz, and the use of quickstep. Indeed, a stepping method made to be less accurate gives more stable results. I wouldn't have guessed, but in the future logic doesn't exist.

I don't consider this problem solved, however it'll do for the time being.

------- Original Message -------
> --
> You received this message because you are subscribed to the Google Groups "ode-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ode-users+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ode-users/Qrg-jwIhVmBeVJu_4CZ8SAiVOuecHCVTNH8rb5Dq85w5DsmYwzG78FqbxeLrU40I1bQhIOm2UTdaINeItaPRlJgyOZ3zH64vLIapYbmcE0w%3D%40protonmail.com.
Reply all
Reply to author
Forward
0 new messages