How to reset the location of an actor? (Did work, now won't!)

Below is how I have my blueprint set up in order to return an actor to its original location should the player mess up the level

This was working up until I had to change the actor from a standard static mesh to a blueprint class actor. Now SetActorLocationAndRotation doesn’t do anything. I’ve tried in both the level blueprint and the blueprint class.
How I can I get working again now it is a blueprint class?

Can you try accessing your MatSphereLoc and Rot as getters rather than as the output from a setter when hitting the R key? The setter will require an execution pin that isn’t called from the R key (assuming that is where the issue is occuring…)

I’ve changed it so the New Location and Rotation input comes for Get rather than the Set output but still nothing. Checking the blueprint while running, the R key does fire, but the Set location and rotation does not. I’ve added a Print String to the end that does get called too.

Hmmm - double check, if your current blueprint is similar to what you have above, it looks like you are resetting the BPC_RedBall to the location it already is, which would effectively do nothing. Can you verify your reset coordinates are as you expect?

He’s right, don’t mix accessing from the SET. Use the variable’s get (CTRL-drag the variable onto the blueprint) and use it that way. Do the SET and then don’t use the output of that with the R key event.

I’ve used Get now but I am still having the same issue. I’ve recreated the blueprint in the actors graph editor and that won’t work either. All the values are correctly set when debugging.

Would you mind posting a screen cap of your current graph?

I’ve tried to simply it by manually setting the location variables and removing the rotation variables. This is how the blueprint looks now

By strings print when i press Y, but my actors location does not reset

Where and how are you setting the Ball Locations?

I have got the locations from the actor location in the level view port, then copied and pasted it into the vector variable

Just trying to rule everything out, i know you can obviously move the balls but can you check to make sure the ball objects are not static or stationary, but that they are indeed moveable? Outside of that, I’m not seeing where the issue could be. If you are setting the location vectors to the map layout location, then in game moveing the balls, then resetting them and they aren’t moving, then I’d say it’s:

  1. The location vectors aren’t correct
  2. The ball is immovable (doesn’t make sense)
  3. There is something overwriting your location vectors at some point,k bringing the issue back to #1

Both the Root and Static Mesh components are set to movable and I’ve tried setting the vectors both manually and with Get Actor Location on Event Begin Play. Debugging has shown them to be correct too. When I have the time tonight I’ll set the same thing up with a static mesh to compare it to my actor class.

Another thing yet to try, I’m still thinking that the issue is probably with the vector values; in your PrintStrings, output the values of the location vectors and see what the values are.

Tick that Teleport [ ] Checkbox

Just tried that now. The values remain at the ones I set them at no matter where the balls are moved, so that rules out them being overwritten.

Tired, still no luck

How are you moving them in-game before resetting them? Are you calling SetActorLocation on them? Are the balls moving at all when resetting, as if to a strange location or just staying put? And you’ve double checked you actually have the references to the actors you are expecting to move?

You probably have, but this is definitely strange, just trying to check every possibility…

How I am moving them is a good point actually, I hadn’t questioned that because it there was no issue reseting the location of static meshes using the same movement and reset methods. For movement method I am using Line Trace and Physics Handles. [Here is a link][1] to the Wiki page that contains the blueprint/instructions I used to achieve it

Now you have mentioned it, I have a feeling that if any part of my ‘pick up and move object’ blueprint is causing the issue it would most likely be this part

Hmmm - I’m guessing maybe that as a physics object, if the physics handle is still attached to it, that even though you are moving the ball, the ball is parented to the physics handle, and therefore the object can’t move? You could try detaching the ball from the handle before resetting, and also try turning off the physics for the object before resetting?

Maybe try creating a blueprint with the ball, no physics, then grab some arbitrary location vector in the map and set it as the reset location. In the map, set the test blueprint (ball) anywhere in the level, wire up the response to the R key to reset, and then check and see if it moves (resets)?

I obviously can’t say for sure, but I’m guessing that even though it worked before, you actually made some change somewhere along the pipeline that maybe you missed that caused it to stop working?

In this example you are resetting Location and Rotation on every tick. Is this for the same object you’re trying to re position in your original question?

It looks like a dog’s breakfast - you might want to upload the project somewhere for people to have a look directly. I have a feeling it’s something simple.