Given a plane and a 3D point, transform the 3D point to a 2D coordinate along the plane.

Blitz3D Forums/Blitz3D Programming/Given a plane and a 3D point, transform the 3D point to a 2D coordinate along the plane.

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

"The way I did this in Blitz 3D was to create a pivot, point it at the point x,y,z with Chroma's point function (or pointing at another pivot works, too). I found I then had to rotate the entity to its own pitch, its own yaw, and a roll of 0."


In doing so you are defining the up axis of the plane as being the Y axis of the world projected onto the plane.

If you do that, then when you are pointing exactly up or down then the Y axis projects to a single point on the plane and you lose your frame of reference.

This sort of hack would have resulted in a random direction for the plane's up direction being chosen in cases where the plane is aligned to the XZ plane of the world, unless the object you're pointing always starts from the same orientation or Mark's math is doing something funny.