Announcement

Collapse
No announcement yet.

How to sort and add scene meshes to array, along with their attributes ?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    How to sort and add scene meshes to array, along with their attributes ?

    I haven't done this yet, so I am not even sure how to do this.

    Basically I have bunch of samey static meshes in my level. Let's say I have SM_rock01, SM_rock_lg_1, SM_boulder_sm, etc. I used them to make caves, rock formations, etc. etc. by copying/scaling/rotating and moving copies around (sort of modular design).

    Now, using Construction Blueprint, I need to create an array and pull all of these meshes into it (using for loop, as while loop crashes editor apparently when used in construction script), along with their attributes (rotation, world location and scale; in the same array or in a separate arrays for each of the attributes).

    I am guessing each mesh (let's say SM_rock01 and all 200 of its copies) should be in its own array ?

    Also probably need to have a counter so that I know how many meshes total were pulled into each array.

    Once all that said and done, I need to make all these invisible and hidden (on the level). Ideally it would be nice to hide them when playing in the Editor as otherwise I'd still need to work with the meshes on the level.

    Can someone please help me out and explain how such contraption could work ?

    Thanks beforehand
    Last edited by motorsep; 06-24-2016, 12:08 AM.

    #2
    I did some searching and I found Get All Actors of Class, but that means I'd have to make hundreds static meshes into BP actors in order to be able to use that BP node. Not practical, unless I am missing something :/

    If it's the only way to get it done, then how do I get location/scale/rotation for individual actors, and then, for example, print out actor's name and the corresponding loc/rot/scale and also get a total count for meshes of the class I just got?

    Comment


      #3
      Never mind, I figured it out

      Comment


        #4
        kinda sad to see no one is helping in most of the threads.
        please tell us how u figured it out and what is your result

        Comment


          #5
          This is all I did: https://docs.unrealengine.com/latest...specificactors

          Comment

          Working...
          X