Check which direction the player was hit from?
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. Does anyone have any other methods? (Cheers)!
(comments are locked)

Don't try subtracting rotations, that won't do you any good.
Hi Tuerer, Thanks for the response. 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. Namely the "dot" and "ASINd" nodes. These are just common mathematical functions, I don't think I can explain it better than the Wikipedia can. Edtd: Basically these two nodes together return the angle between two vectors. 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.
(comments are locked)

Follow this question
Once you sign in you will be able to subscribe for any updates here