Point 2 Plane projection controller

Wonder how to create script controller for orthogonal projection to a point helper onto grid helper.
I just have a piece of code like

The projection of a point q = (x, y, z) onto a plane given by a point p = (a, b, c) and a normal n = (d, e, f) is
q_proj = q - dot(q - p, n) * n
This calculation assumes that n is a unit vector.

But dont know how to put it in controller.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vanyfilatov's picture

MIY

Already made it
Its position script controller.
For working properly controlled object needs orientation constrain with "plane" object
and need to be child to plane

AttachmentSize
point2plane.ms 165 bytes
vanyfilatov's picture

Or better will be move helper

Or better will be move helper with world coord system to another reference helper, and than change it Z position to 0 with local coord system of plane

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.