Hi all, I’m having a problem that’s stopping me from progressing on an already ambitiously sized project. I basically want to recreate the way the rigidbody velocity is redirected when it hits a wall, since I’m building an arcade moveset and RB physics moveset, and need wall collision (and velocity redirection) to be present (and very similar) in the two modes.
Here’s an image showing the side and top view of the desired outcome.
Left being side view, right being top. The magnitude will always stay the same, just need to redirect the direction to be pretty much parallel with the collision surface.
I’ve tried getting the collision normal, then working off of that using Vector3.Cross and other things, but just cant get it to work perfectly. I’m sure it’s just a bit of math that I’m missing, but I was never a huge academic-type in the first place. ![]()
Any suggestions? Anything would be super appreciated.
