Archive 17/01/2023.

Roll or rotate bone on contact?

lebrewer

I’ve been trying to implement a small feature on my third-person character. When his arms touch any surface, I was trying to rotate the pelvic bone so you never have arms inside geometry, for example. I’m doing a raycast, but when it hits, how can I get the pelvic bone from the raycast callback?

evolgames

I did something that is not as elegant as it probably could be. I have ragdoll-like collision shapes ready to go at character creation, rather than just a large capsule. I needed to do ragdolls anyway so raycast hits on those collision shapes are easy to track. Then you can just grab the corresponding bone and manipulate it.

lebrewer

Oh, that’s really smart. Thanks, i’ll try that approach!