Cross Product and chirality/handedness of coordinate system

I didn’t really understand how cross product and chirality relate? You might want the x and z coordinates to have a correct y coordinate for aesthetic reasons but what does that have to do with the perpendicular line direction to any random plane in 3d space? How does a random plane have coordinate system correct perpendicular line direction? (I guess since any random vector begins at the origin all the random planes intersect the origin) Is there any use to the getting the cross product with the proper coordinate system direction other than convention?

Normal vector direction in games is usually determined by inside vs outside of an object rather than the coordinate system right?

Also what did you mean when you said flipping the vectors? Did you mean multiplying them by -1?

Secondly how would you know which vector to multiply first to get a vector direction according to the proper coordinate system?

Great questions @okilydokily1!

The cross product will give you a vector that is perpendicular to your two input vectors. If you change the coordinate system from left to right handed, the same calculation will end up pointing the output vector in the opposite direction.
You don’t normally have to worry about this but it’s worth bearing in mind if you try doing the same calculation in different engines/environments.

When working with normal vectors in 3D modeling, it is common to refer to the “inside” and “outside” normals but when using the cross product in code you will often be working with the coordinate system. For example, when plugging values into the formulas for vector reflection or projection, you need the coordinates of the normal vector for the surface you’re hitting.

When it comes to knowing which order to cross your vectors, it sometimes comes down to trial and error.
Usually it’s fairly intuitive and crossing them in the wrong order will simply result in your output vector pointing in the wrong direction, so it’s usually a pretty obvious bug that’s easy to fix.
“Recalculating normals” is pretty much just swapping the order in which the vectors are multiplied.

I hope that helps, but if you have any other questions, please let me know.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.