How to get perpendicular angle to vector?

Is there a way to calculate the perpendicular angle to some vector?
As a rotation axis, it will be Z

In 3D space, an infinite number of vectors may be perpendicular to one vector. You need to be more specific.

If you have 2 vectors, you can calculate the cross product to get a vector perpendicular to both of them. In this case, only 2 results are possible.

If you only have one vector, you can rotate it 90 degrees to have a perpendicular vector. But then again, you’ll need a second vector to be the rotation axis.

1 Like

Thank you. Sounds reasonable, I’ll look at the cross product

Hey, I know it’s late, but here’s how I did it:
Rotate a SpringArm with a Widget (nameplate attached):

I wanted to have the perpendicular angle between my camera and a target pawn to show the widget always on top (My pawn moves in 3D):

Get the Up Vector of my camera, make a quat from it (because it’s a direction vector I can), set the rotation. Done.

1 Like

In case you need to do this in material, there is an example of Material Function to rotate a vector in XoY plane (vec2) around Z+ axis.