Single axis object space move to parent objects ground plane - MAYA

You can quickly get a prototype using a variety of methods to approach a given problem. For example:

  1. A simple way to find the intersection of a ray with a plane (using elementary vector mathematics).
  2. Using the Maya API and the closestIntersection function
    Both methods are discussed in detail here:
    Intersection of a curve and a mesh - #8 by VVVSLAVA
    Even if you don’t use the closestIntersection function, it still makes sense to use the Maya API. Because then you get high-performance tools for working with vectors and Maya matrices out of the box.
    Using transformation matrices will certainly help you better understand the “kitchen” of any 3D application. But in the context of your problem, this is just an additional method.
    To quickly get and set transformation matrices, you can use the command xform with key -matrix with subkeys -worldSpace,-absolute, etc:
    xform command
    Also, if you were to describe the global goals that your code should fulfill, then perhaps a more efficient solution could be found using other methods.
1 Like