From Petfactory: Hydraulic piston

Paul DoylePaul Doyle Administrator, Fabric Employee Posts: 229 admin

CEO at Fabric Software


  • Roy NieterauRoy Nieterau Posts: 258 ✭✭✭
    edited November 2015

    Very nice and simple setup.

    I was wondering why so much of it was still done purely in KL. Especially moving of the meshes at the end with MergeMeshClones. Since you're outputing the matrices anyway it would only take two additional nodes (one per mesh) to do it purely within Canvas.

    Not that it's "easier" when it's more separate but they seem like two different tasks. The calculation of the matrices and the changes of the mesh. By having the function be more granular (only output the matrices) it's just as fast and useful when you'll be using it somewhere where it doesn't need to reposition mesh. Making it easier to create low-level (often reusable presets). Of course now you have a nice high-level one. :smile:

    Also good to see that you have the knowledge of creating a rotation matrix (the math behind it) though just wanted to point you to Quaternion.setFromDirectionAndUpvector, see here.

    Keep it up!

  • Hi Roy,

    Thank you for the feedback, I really appreciate it. The only way to learn (fly) :)
    Yep, what you suggests makes sense. It would make the node more flexible and reusable. I will implement that.

    The reason why I did it internally was that I am learning KL and I have found reinventing the wheel is sometimes good when learning (in production not so much...:) also that it was a quick project and actually didn't think of it, so thanks for pointing it out.

    Yep, I did a test before where I used the Quaternion.setFromDirectionAndUpvector and it worked fine. But I wanted to be able to control which axis where used as aim and up and the Quat preset (as far as I understood it) did not allow for this. Also it was mainly about learning KL so it was good practise to create it myself.

    Again, thanks for taking the time and writing the feedback!

  • Paul DoylePaul Doyle Administrator, Fabric Employee Posts: 229 admin

    Just saw this :)

    CEO at Fabric Software

Sign In or Register to comment.