Home Unreal Engine

Spawn Static mesh in level via kismet at runtime

polycounter lvl 10
Offline / Send Message
Pangahas polycounter lvl 10
How do I correctly spawn static meshes via kismet at runtime?
The way i have it working right now is placing the mesh in the map hiding it at map start then unhiding it via a trigger.
Are hidden meshes not rendered ?
Basically I wanted to spawn static meshes randomly from a list on certain locations at runtime. How do I do that via Kismet?I tried to use level loaded connected to actor factory then set factory to actorfactory static mesh but it doesnt seem to work.
Would be great if someone can help me

Replies

  • Jack Ryan
    Never tried it with actor factory but try using a KActor and not a static mesh. Static meshes generally can't be changed / affected during run time apart from some exceptions, the clue is in the name.

    Otherwise, I've always used the hide/unhide method.

    You don't need to hide the mesh at map start in Kismet, you can hide it in the properties of the mesh. Collision will still be there and you'll need to disable that also. That can be done very simply with a toggle collision node.

    I'm 95% sure that draw calls will still be an issue for hidden meshes, so if you need to concern yourself with performance you have that to consider.
  • Pangahas
    Offline / Send Message
    Pangahas polycounter lvl 10
    Thanks for the reply,I generally just want some basic meshes to be spawned at certain locations I dont need them to move so yeah just static meshes.

    A couple of guys via pm suggested using UTActorFactoryTeamStaticMesh which is located at the bottom part of the dropdown list and it works,so problem solved.

    Might still be using the hide/unhide for some of the objects so yeah thanks to all who replied.
Sign In or Register to comment.