Hello, I’m trying to control the behavior of my capsule collider so that it behaves the way I want when falling on an edge. I’m still not sure how to do what I want which, in the end, on paper, is pretty straightforward :
You know how gravity makes a Rigidbody fall ? And you know how if a Capsule collider is on an edge with the center not touching the ground, it kinda slides off to end up falling ?
Well with regular physics, it will slide faster the further away from the edge the capsule “sphere center” is.
What I want is for it to slide off as quickly as needed so that we keep that 9.81 m/s2 vertical acceleration. Which would give that effect :
https://forum.unity.com/attachments/pushed-gif.1310018/
Apparently I should hook into the contacts and perform what I want based upon them using Physics.ContactModifyEvent, but I don’t know how to do this.
Can someone please help ?
Thanks !