Get Location By Raycast Mesh Array

DriverDriver Posts: 1
edited August 4 in General

I experimenting with GetLocationByRaycast_simple_array and I have trublse to make Raycast work with array of meshes.

I'm new to this program and I do not really understand how make it through canvas loops.


  • EricTEricT Administrator, Moderator, Fabric Employee Posts: 306 admin

    Hi @Driver,

    This depends on the context of what you're trying to achieve. Could you give a bit more context of what you're trying to build as the end product?

    Without other context the first and probably more versatile option would be to create a PolygonMesh[] (array) and loop over it. In each loop you'd do the raycasting just like in the example you opened and started testing with. You'd then push the resulting positions and normals into 2D Arrays (positions[][], and normals[][]). That keeps the results ordered with the Polymesh[] array so that you can pull the results for mesh 0, by doing positions[0] and normals[0].

    To do this setup we recommend using a function node with a block where the function node is looping over the Polymesh[] array. Have a look at the ForLoop preset we ship with and you can modify it as needed to build this out.

    Hope this helps. Let us know if you have any more questions.

    Eric Thivierge
    Kraken Developer
    Kraken Rigging Framework

Sign In or Register to comment.