I have an issue with one of my actors where the location of the actor doesn’t change in-game when the actor in question is moved, however it’s StaticMesh component location does. As such, SetActorLocation doesn’t have any effect. I should note that I’m working in the Level Blueprint, trying to reset the actor on the EndOverlapEvent of a Trigger Volume. I’ve included a picture for reference:
Your set location does not have a proper target. You must set the Football to be the target if you want to move the target. Drag out a pin from the football reference and use set actor location. Then give it the vector for that location as you have already done.
And you have confirmed that the code is being executed? Try setting it to teleport. Make sure you dont have the ball set to static or something. Finally, how are you moving the ball inside the blueprint?
I’m seeing the “GOAL” string getting printed out every time the ball passes through the trigger volume, so I’m pretty sure everything is executing.
Teleport didn’t seem to do anything, but I did notice that my Default Scene Root in the ball actor wasn’t set to Moveable, which it now is. This didn’t do anything either unfortunately.
As for how I’m moving the ball; the blueprint for that actor itself is empty. I’ve got a Static Mesh which is simulating physics, as well as Generating Hit Events. I’m using the Collision Preset ‘Physics Actor’. I also have a Sphere Collision component with more or less the same setup. Simulating Physics, Generating Hit Events, setup as a Physics Actor, etc. I’d be happy to provide screenshots if necessary.
I changed the x,y, and z values of vector DefaultBallLocation so as to make sure that it’s not equal to the start location - again though, it doesn’t appear to have done anything. Can you think of a reason why the ball’s current location while in-play wouldn’t match that of it’s own Static Mesh?
Yeah, the Generate Overlap Events checkbox is ticked. Also, I’m seeing the print get executed so I’m pretty sure the rest of the code is executing - unless there’s another way to check for certain?
You can see it fire if you look at it while it is running. Connect the M key event to your code, and, when you press it, see the lines light up on the other screen. If you dont have another screen, add a 2 sec delay, hit M then swap to the level blueprint tab.
Figured it out in the end: turns out I didn’t have the Football blueprint’s Static Mesh component set as the Root. The code now executes exactly as expected.
This thread is old and without a answer for people looking just tick Component Replicates on the static mesh or any other component you need to update.