I want to create a scene where a trail is becoming visible in steps when you interact with an object. To achieve this I’ve created a blueprint with 3 planes, where only the first plane is visible. The problem is I don’t know how to get the mesh from the trail" blueprint inside the “letter” blueprint(the object I’m interacting with) and set it to visible there. I thought of assigning an integer to the meshes that need to become visible to tell the program which part I’m referring to, but I don’t know how to do that either unfortunately(or if it’s a good implementation). Any help is appreciated, but since I’m quite new to Unreal I would need screenshot showing which nodes to use. It also needs to work in VR.
Here are some screenshots for more clarity(hopefully).
when you say “trail” do you mean like you want these things to be following a path like “a line of ducks” or like “footprints in the snow/sand” then instead of each possible one of these being their own object (there is a practical amount of objects that should exist, and each one will add overhead to the Engine)
what you could do is hold them in an array (you can right click the variable in the “Variables” section which will convert it to an array) or you can hold lets say 5 of them separately as children Actors in the “Components Hierarchy” (using the “+Add” button) then you can manipulate their position through their transform.
for footprints you could be cycling through them where you keep shifting the one at the back to be at the start of the array. for the line of ducks you could go backwards through the array moving them toward the previous one in the array, and move the once closest to the object closer to the object itself.
if an Actor type thing shall be in the level, and you must get a a hold of it based on criteria then there are several ways to accomplish this:
'GetActorsOfType()` (just right click in an empty space and type “Get Actor” and it should be highlighted) this will return every actor in the current level, and in relatively random order so you will need to do extra steps/checks to make sure it is the one/ones you want.
do a sphere trace/cast for Objects: (right click in empty space and type “sphere”) if this is going to be in VR then I would need a bit more on perspective as that can get special to visualize. you could also SphereTrace from an actors location
-keep in mind that a sphere trace/cast will return everything of the criteria in the radius in effectively random order.
you can also accomplish this with just a line trace especially where you are potentially using a pointing device anyways with VR (even if that pointing device is the camera itself)
or some kind of manager where you have all the objects of the class register themselves; where the manager maintains the relevance of each one, and then you quarry the manager when you need them.
if these effects are not what you are looking for could you maybe show a picture (even like a story-board type thing) for what you are intending.
I just want flattened cubes to become visible one by one really. More like a bridge where each segment is added as you interact with things. So I have a blueprint (the trail) with three “cubes” where only the first is set to visible by default.
how is this interaction going to work?
will say a character be within a certain distance of the BridgeSection?
will there be some kind of click event?
will there be a button pressed somewhere else?
you can solve all of these individually or you can have them all solved together.
for example if you had a BP_Interactable that BP_BridgeSection inherited from where BP_Interactable just had some functions Like InteractOn() and InteractOff()
then in your BP_BridgeSection you would override these InteractOn() and InteractOff() to change the Visibility.
through a system like this you could also have a BP_ReadableSign which when its InteractOn() is called you could display a text box.
to call the function for example when an Actor is close to it would be through an OnOverlap_Event, while if the user say uses the InteractButton on them it would just call the same InteractOn()
if the Interact is to point at the object and use the InteractButton you would fire a “line trace for Objects” then test (“Cast To”) the “Hit Actor” against your BP_Interactable (pull the pin out of “Actor” in the “Hit result” and type “Cast To” then start typing the name of your class or parent class if it doesn’t show up then check your spelling is consistent, and/or turn off “context sensitive”) out of the ‘successful’ then call InteactOn().
this way you would get something a lot more reusable in this project and maybe future projects. you also save the potential weight of Hard references in your blueprints.
if you want to look further into this it would be “unreal engine blueprint interfaces”