Now that I'm more awake, there's a potentially easier option as well. if you dot your vector you want to project against that perpendicular vector, then add the negative perpendicular vector normalized multiplied by that dot product, you'd get the same result.
magnitudeFromPlane = vec.dot(perpVec) toPlane = -(perpVec.normalized() * magnitudeFromPlane) projectedVec = vec + toPlane On Tue, Mar 22, 2016 at 9:03 AM <[email protected]> wrote: > thanks Joe for the help! > > for some reason i thought it would be easier than this, maths isnt my > strong suit but im gonna give this a go! > > cheers, > Sam > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/7f01c98a-be49-4f46-93f1-298d37068b41%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAM33%3Da4%2BvMxpJ6siv42BhPJqZEK3kF7FNYZO5OenogLa3jDzVw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
