Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

setactorlocation not working in 4.8?

I posted about this in another thread but noticed it was quite dated and referring to another version. In 4.8 it appears setactorlocation isn't working at all. I created a basic blueprint to test it but nothing I attempted worked. alt text

I've attempted disabling physics on the object temporarily and using other similar commands like setactorlocationandrotation, but it has the same issue. I tested the blueprint in 4.7 and it worked perfectly. I'm currently using movecomponentto as an alternative but there are some obvious shortfalls with using this.

Was hoping someone could shed some light onto why this isn't working or even if they do or do not have the same issue.

Product Version: UE 4.8
more ▼

asked Aug 23 '15 at 05:38 AM in Blueprint Scripting

avatar image

1 1 1

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

I haven't had any problems with SetActorLocation (using 4.8.2).

I realize this is a simplified test, but it's hard to tell what you tried in your actual project. Are you sure the input gets through correctly? Also, you're changing the Z position. Could gravity interfere with that?

more ▼

answered Aug 23 '15 at 06:46 AM

avatar image

1.8k 69 28 113

avatar image Nup Aug 23 '15 at 07:50 AM

Hi, Thanks for your answer. I too am using 4.8.2 I was setting the Z to 200 so that it wouldn't be moving to under the ground in the default 3rd person starter map. In my tests on 4.7. It was functioning correctly, the exact same set up in 4.8 wasn't. I had a friend test it on his computer and I tested it on my laptop all systems behaved the same.

I came across the issue trying to make a simple soccer prototype that reset the position of the ball after a goal was scored.


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I've done nothing different to the default 3rd person template. At begin play, I spawn the actor into the world with the "T" event at 500 units in front of my character based on location/rotation.

alt text

Then I go into the mesh BP just as you did and enter the same code, except I get the actors location and add 100 to the Z axis so that way each time I press "E" it continues to move upward rather than simply set it's location in the world at (0, 0, 200) like yours does.

alt text

And everything works fine for me! I didn't have to mess with any physics, everything is virtually default of the 3rd person template.

alt text alt text

Hopefully you see something here that you may have missed. Oh, and BTW I'm using 4.8.3 but I have never had any issues with SetActorLocation in any version from 4.7 - now.

setspawn.png (256.1 kB)
setactor.png (231.1 kB)
setexample1.png (742.3 kB)
setexample2.png (747.1 kB)
more ▼

answered Aug 23 '15 at 08:38 AM

avatar image

1.4k 70 29 92

avatar image Nup Aug 23 '15 at 10:07 AM

If you turn on simulate physics via any means does your object lose its ability to be moved via this?

Your set up works for me as long as the object never simulates physics.

avatar image jtsmith Aug 23 '15 at 11:12 AM

I'll check this in the morning for you if you haven't already solved your problem

avatar image erinacea Aug 23 '15 at 06:45 PM

Ah yes, physics appears to be the only difference. With Simulate Physics activated, I can reproduce this, too.

Could be a bug. After all, a quick search brought up the fairly similar https://answers.unrealengine.com/questions/83864/i-cant-use-set-actor-location-on-a-child-bp-that-h.html which also still exists.

avatar image Nup Aug 23 '15 at 11:01 PM

That's such a relief, I was beginning to think I was going crazy, or overlooking something really rudimentary. Thanks for trying it out. You'll notice I posted on the other thread before I made this one, as this is my first time actually posting here I wasn't sure if that thread was dead/closed or not.

Hopefully there is a fix for this soon.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question