Announcement

Collapse
No announcement yet.

Spawning an Actor using a Procedural Mesh

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

    Spawning an Actor using a Procedural Mesh

    Hello all,

    i feel like i have a quite simple problem in front of me, but i dont know how to deal with it.

    I will try to explain my steps of thought and the conclussions ( visualised by ->) i get from them und maybe hopefully someone can help me.
    1. I have a huge XML file, which contains vertices of buildings, and i need to display them.
    -> I need to create my own mesh in c++ and somehow plot this on my landscape
    -> The only option to create meshes in c++ seems to be by using Procedural Meshes
    2. I succesfully created some Procedural Meshes and i am able to drag and drop them into my world
    -> My main Problem is that i dont know how to spawn these meshes in a specific location (given by my xml data)
    3. I know how to spawn an Actor in a specific location and recently did a tutorial on how to spawn trees this way
    -> therefore i thought i can just make an Actor using my procedural mesh and place this in my world

    But as u might know, because i am writing this post, this approach isnt working.
    My problem seems to be that actors can only be created using a staticmesh and i cant find a way to convert my proceduralmesh into a static one.

    I hope someone can follow my line of though and either provide a better (but reasonably simple) solution or can show me a way to spawn an actor using a proceduralmesh.

    Best Regards,
    Daniel
    Last edited by Daniel Hauch; 09-25-2018, 07:31 AM.

    #2
    Do you want to do this at editor or run time?

    For run time, create a custom actor subclass and set the root component as a procedural mesh component, then dump your mesh data into that.

    For editor time, you could look into the feature that lets you convert a procedural mesh to a static one. This would then have better runtime performance.

    Comment

    Working...
    X