Best way to change\swap object in game?
Good day guys, I am new with BP and I have something in mind and would like some advice before starting it. I would like to be able to change a mesh in game with a widget. For example, 3 static meshes (Sphere, Cube and a Plane) and each time I am selecting next on the widget the actor will change as a loop, Sphere, Cube, Plane, Sphere etc... Is it something like turning visibility ON on the Sphere and OFF on Cube and Plane, etc.... or there is an other method to do so? Thanks in advance guys.
asked Oct 08 '18 at 03:55 AM in Blueprint Scripting
Yes you can do it that way if you like. Less work for the garbage collector that way.
You can also spawn and destroy. Just mind the collision and sizes either way, if they are meant to collide with things.
To cycle around an array of references to components or actors you can increase the index variable you make for it each time, adding 1 to it, mod by the length of the array and then assign that New value to the index var.
answered Oct 08 '18 at 07:21 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here