Detecting Left/Right Side Collision Problem

I have a capsule trace on my character that gets the right vector of its capsule component along with the hit location and returns the inverse sin of the dot product of the two vectors, I then have a bool that will check if its less than 0 or greater than 0.

The problem is some surfaces will result in 0 degrees and won’t allow for the bools to be triggered how do I go about detecting the sides on these surfaces?

bump⠀⠀⠀⠀⠀⠀

you just want to test if it’s left or right hit of the capsule trace?
or left or right hit on the character?

Wouldn’t the hit side already be clear by the right vector and the trace direction?

I’d like the left or right hit of the capsule trace, I use a capsule trace because I’d like to detect within a margin of error of it deciding if its left or right.

It’s a wall ride system so the capsule trace allows for my character to detect rounded surfaces etc while its moving along it and deciding if its hitting on that surface or not. It also uses the impact normal to set the actors rotation along the surface.

My problem is the system I implemented will return 0 degrees on certain surfaces and the bools won’t be triggered since its not greater or lesser than 0.

C++ or Blueprint

as a side node on capsule trace as far as I know this has no rotation, basically it’s always a standing capsule you can not rotate hope that is okay for your application

which also means the right vector of your capsule component is only applicable for a capsule trace if the capsule component does only rotate yaw