Casting gets the particular instance of a blueprint. Simply creating a variable based off a blueprint is not enough; you must reference the actual object (instance) that is currently within the level. When you do a cast, it is only necessary to do it once, because:
Once you have the new variable that contains the instance, you are able to use that variable from then on to utilize any events, functions, or public variables (if you don’t see a variable you want, go to that BP and set the variable to editable) that reside within the instance’s blueprint. Anything you do will affect ONLY that instance, so you could have multiple instances of the same blueprint doing different things.
So here’s a couple methods for casting. First one involves using a Get All Actors of Class node that will return all actors of the class you specify. You use Get to grab a particular one of the returned array. If you have just one in the level, you’re good. Otherwise, you would specify which one by setting the integer value of the Get. Once you have your object, you can then do a Cast to [class of the thing]. Finally, from there, you can drag out and select Promote to Variable to save the instance.
You can then use that variable to access whatever you need. You also do not need to recast if you need to use that variable at some point further along in the processing order.
Here’s an example that involves casting from an overlap. You check the actor class to make sure it’s the right type of item, and then cast to your actor with the result of the overlap.
And since you mentioned that it’s a ball and probably want some physics happening, here is the method for altering the physics of an object in real time. You can’t enable/disable gravity and physics on an entire actor, because those properties are based on the components of the actor, and specifically the root in almost all cases.
Take your instance variable from earlier and use Get Root Component. Now, use that to Cast to Primitive Component. You now have direct control over its most basic properties. You can save that as a variable as well, which lets you use that in later processes to control those properties without recasting.