I made a widget that pops up on screen at a certain time in the game. If you click the YES button on the widget I want it to move to a camera in the game that I setup looking at a gate. Then after about 5 seconds I want it to move back to it’s original camera.
The problem with this is whenever I click the button on the widget, the camera usually pans off to a random spot on the map instead of the camera actor I put in the game. I ONLY HAVE 1 camera actor in game, so shouldn’t it always go to that camera instead of out in the wild?
I did play around with the BP and I removed the “Random Integer” node and plugged the “Length” node into the “GET” node, and now instead of my camera moving off to the wild blue yonder, my screen now zooms in on my char’s stomach, then zooms back to normal.
I am not sure what is the idea behind using a random integer, but if you only have one instance of CameraActor in the Level, you can simply use 0 in the ‘Get’ node, since the only element in the array will be that single CameraActor. I don’t know if you are aware, but arrays are indexed from 0, so the first element will be Index 0, second Index 1, etc.
When you have used the ‘Length’ node, it returned 1, but that index is not exisiting in an array holding only one element.
Appreciate it very much. That worked like a charm. I deleted the length and random integer nodes and just connected the get node into the get all actors of class node and it works perfectly. Really appreciate it.