This has proven to be a real head scratcher since I am so close, but Unreal’s strange -180 to 180 degree rotation system is really throwing a wrench in the works.
I have made a wall running mechanic, but I want to figure out which way to lean the camera while wall running. (For game feel)
Literally all I need to do is use the information from my “Hit” event node to figure out which side of the player the wall is one (Left or Right).
It really is that simple, but I am having so much trouble with this. I thought the obvious answer would be to take the Normal rotation of the wall surface, and then subtract the player rotation, and boom. I would have a Rotator that I can use to pinpoint exactly on which side the player was hit. But the rotation system really gets in the way of this.
Could you give me a quick explanation on what some of these nodes are doing? Just for my own benefit and understanding my code will help me on this project down the line.
Okay, I finally got my head around the nodes. I didn’t find the Wikipedia pages as much help since they are extremely comprehensive.
But for anyone else: from what I gathered, the Dot, node compares the similarities between two vectors on a range from -1 to 1. Specifically as normal directions.
Then the ASINd converts them to degrees. But, for my case anyway, Dot was all I required to get the results I needed.