Maths : perpendicular point

Hi,

I am trying to avoid some obstacle in space environment.
I am a bit low in 3D maths, and I hope little help on my topic.

I am moving forward, and I have an obstacle front of me.
The idea is to determine a point to go to at the side of the obstacle.

I wish to determine it from the center of my node + radius of it, and at the perpendicular (not very important of the direction of the perpendicular vector) of the vector forward of my ship.

Sounds to be a good idea, and I can easily grab the forward vector, the center, and radius of the obstacle node, but I don’t know how to provide a perpendicular vector, and have my final point.

Can you help me?

Thank you

There are, of course, an infinite number of vectors that are perpendicular to your ship’s forward vector. All of them fan out in a circle around the forward vector.

But if you don’t care which one you choose, then you can pick an arbitrary fixed vector–say the up vector, (0, 0, 1)–and compute forward.cross(up). The cross product of two vectors is a third vector which is perpendicular to both of them. Thus, forward.cross(up) will be perpendicular to the up vector, and also perpendicular to your forward vector.

David

Thank you for your response.