Announcement

Collapse
No announcement yet.

How to Spawn mesh from reference

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

    How to Spawn mesh from reference

    Hi I have a datatable which has a mesh reference, X, Y, and Z
    I can use X, Y, and Z to spawn a static mesh but I dont know how to use the mesh reference from the datatable

    This is where Ive got to, Im trying to use the Tree Type node which is a Static Mesh Object Reference

    Cheers

    Click image for larger version

Name:	Capture.PNG
Views:	108
Size:	83.0 KB
ID:	1774017

    #2
    Originally posted by Jnky View Post
    Hi I have a datatable which has a mesh reference, X, Y, and Z
    I can use X, Y, and Z to spawn a static mesh but I dont know how to use the mesh reference from the datatable

    This is where Ive got to, Im trying to use the Tree Type node which is a Static Mesh Object Reference

    Cheers

    Click image for larger version

Name:	Capture.PNG
Views:	108
Size:	83.0 KB
ID:	1774017
    If you don't know until run time what kind of mesh it's going to be, obviously you can't set it in the details. Then you need:

    Click image for larger version

Name:	setmesh.JPG
Views:	158
Size:	51.7 KB
ID:	1774054

    Is that TreeType pin of type 'static mesh object reference'?
    Check out Zof ( puzzle game ) on Steam:

    https://store.steampowered.com/app/1414480/Zof/

    Comment


      #3
      Thanks yes it was.

      Ive changed the way I was thinking with this and decided to try to spawn an actor because I would like to have collision events and populate the actor with information.
      The actor needs to contain some information in the form of four strings, I can get the actors to spawn but I dont understand how to pass the strings into the actors as I spawn them, heres my level blueprint, I started looking at an array, I have made an array variable in my actor BP but how do I pass the data to the actors as I spawn them?


      Click image for larger version

Name:	Capture.PNG
Views:	90
Size:	86.6 KB
ID:	1774319

      Comment


        #4
        I found a workable process see below
        By spawning an actor is this an instance? will I run into performance issues down the track using this method?

        Ive basically made a BP with an empty mesh, a collider and a string array, then use this in th elevel BP to populate and distrubute the asset around the scene.

        Click image for larger version  Name:	Capture.PNG Views:	0 Size:	161.3 KB ID:	1774426
        Last edited by Jnky; 06-11-2020, 07:06 AM.

        Comment


          #5
          Originally posted by Jnky View Post
          I found a workable process see below
          By spawning an actoris this an instance? will I run into performance issues down the track using this method?

          Ive basically made a BP with an empty mesh, a collider and a string array, then use this in th elevel BP to populate and distrubute the asset around the scene.

          Click image for larger version

Name:	Capture.PNG
Views:	78
Size:	161.3 KB
ID:	1774426
          You have the correct method
          Check out Zof ( puzzle game ) on Steam:

          https://store.steampowered.com/app/1414480/Zof/

          Comment


            #6
            Thanks,
            I got there in the end haha, datatables are interesting to work with

            Comment

            Working...
            X