Actor's location not updating with it's static mesh component
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:
The default ball location is where I want the actor (BP_Football) to reset to after a goal, and it's the starting location of the actor in the level.
Below is a comparison of the position of the Actor vs the position of the Actor's StaticMesh component during play in-game.
I'm pretty new to this, so I'm not sure why I the two locations are different and if I can't get them updating together.
Any ideas or information would be much appreciated. Thanks!
asked Jun 15 '17 at 09:55 AM in Blueprint Scripting
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.
answered Jun 19 '17 at 02:20 PM
You use Set relative location. But I think you should use SetActorLocation to make it in world coordinates.
answered Jun 15 '17 at 10:08 AM
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.
answered Jun 15 '17 at 11:07 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here