Hey, I’ve been using your quaternion library and I like it a lot but I’m having an issue. I’m trying to make a pawn that can walk up walls and on the ceiling. Right now I’m raytracing down from the pawn’s up vector to get the floor’s normal. I’m then trying to get the smallest rotation to match the new normal and update the pawn to that rotation. You can see how I’m determining my final rotation below. “Owner typed” is my pawn and New Up is the normal result from the ray trace.
I then apply it to my pawn using the following code.
This works most of the time but has real difficulties once the normal is pointing directly down. I’ve built the following movement test map.
If my pawn walks up the ramp on either the left or right but then tries to come down the ramp in the middle the rotation completely breaks and it starts rotation all over.
Any advice would be greatly appreciated. This has been driving me crazy.