x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Set Actor Location Not Working

I'm having some issues doing a simple follow spline test in BP, simple enough, i'm trying to move a character along a spline, updating the distance alone spline every tick.

As you can see in the attached screen shot I query both distance and rotation alone spline which feeds into a set actor location and set actor location node.. the rotation works while no matter what I do the character is always moved to 0,0,0.. regardless of if it has movement data being pumped into it or I have a singular world space value entered into it.

Anyone know what i'm either doing wrong or why this isn't working?

and thanksalt text for any help

Product Version: UE 4.12
Tags:
capture.png (306.4 kB)
more ▼

asked Oct 20 '16 at 11:51 AM in Blueprint Scripting

avatar image

Ryatta
15 3 5 6

avatar image Nken418 Oct 20 '16 at 12:05 PM

Not quite sure, I don't know too much about splines but maybe the location one isn't set to world space? It's on local. If the rotator is working and locating isn't then that's the only thing I see different.

avatar image Ryatta Oct 20 '16 at 01:10 PM

That was a good fine, i didn't notice I had that set to local but its still pumping out world space locations every tick.. because their set to local they are wrong but none of them are having an effect on the actual greyhound

avatar image Doug E ♦♦ STAFF Oct 20 '16 at 03:37 PM

Hey Ryatta-

I noticed you have a print screen node connected to your "Get Location at Distance Along Spline" node - what is the value being returned from this call? Can you provide the full setup for your spline blueprint to help me reproduce your issue on my end?

avatar image Ryatta Oct 21 '16 at 07:45 AM

the point of the print screen node was to make sure that I was actually getting correct location vectors out of the get distance at spline node so i knew the problem was with the set actor location node

When you say the full setup. what else do you need.. I have a looped spline that I'm getting the location along the line with a float that increase by 10 every tick.. ideally the result would be the character slowly moving alone the spline.. I'm not aware of anything else I should need to make it work.. the actual scene only has a race track the spline is created around

avatar image Doug E ♦♦ STAFF Oct 21 '16 at 02:00 PM

The Set Actor Location node itself is working for me when I try to update the position of an actor. If there is some issue with it working with splines I would like to ensure my test project matches your setup as closely as possible. This would require knowing the steps of how you created your spline blueprint.

avatar image Ryatta Oct 21 '16 at 02:12 PM

My spline BP is attached as image, I just dragged it into the scene and added extra points from that.alt text

though as I mentioned earlier I can't even get set actor location to do anything other then move the character to 0,0,0, when when manually entering a value. I'd love to see a screen shot of your working setup

capture.png (439.3 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

As others have mentioned - it appears the issue is the Coordinate Space setting on the Get Location at Distance Along Spline node. With the node set to Local space, what appears to be happening is the node determines how far forward you've moved and calculates the vector based on the spline relative to itself. So if SplineDistance is set to 0 by default, the first time the node is read the resulting vector output would be (0, 0, 0) since the spline is at it's own origin. After an increment of 10, the new vector would be (10, 0, 0). This is why you're seeing your character move to the origin since this is the vector being used to set the location. By switching to The Coordinate Space to World instead, the vector output will be the spline's position relative to the world. If your spline is located at (400, 384, 747) for example, the first time the Get Location at Distance Along Spline node is called the output will be (400, 384, 747). The next time it's called, assuming the same 10 increment, the output would be (410, 384, 747). Here is a screenshot of the setup that worked for me to move the default Third Person Template character along the spline.

alt text

Cheers

Doug Wilson

spline.png (148.9 kB)
more ▼

answered Oct 21 '16 at 04:10 PM

avatar image Ryatta Oct 22 '16 at 09:49 AM

I can confirm when I tried I was getting the same result in both local and world mode, I'll double check this on Monday when I'm back at work, it was just the original screen shot that I provided had the get location node set to local but I have had it set to world for the majority of the time.

I'll try and let you know, but 90% certain unless I notice something else different I'm likely to get the same result.. to double check your testing this in 4:12?

avatar image Doug E ♦♦ STAFF Oct 24 '16 at 02:52 PM

I can confirm that I was running these test in 4.12. If you are still having issue with the spline movement not working after changing coordinate space to world, please provide a copy of your project for me to test your issue directly.

avatar image Ryatta Nov 10 '16 at 08:56 AM

This bugged me for a while but as it turned out the reason was the player BP has another process in it that someone else had set up driving its location to 0,0,0. so no matter what the level BP did the player was always at 0,0,0

typical :D

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

Uncheck the "Sweep" bool (not sure what happens if you got both) And the "Get Location At Distance along Spline" is on "local coordinates", try World Coordinates

more ▼

answered Oct 20 '16 at 12:45 PM

avatar image

Speckulous
535 22 10 36

avatar image Ryatta Oct 20 '16 at 01:11 PM

Thanks for the response, unfortunately neither of these have had an effect. the print node is still pumping out values from the set location at distance along spline node correctly, its just not accepting them

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

how do I send an actor to different levels?

more ▼

answered Apr 18 '17 at 07:33 PM

avatar image

Jansgreen
1 1

avatar image Doug E ♦♦ STAFF Apr 18 '17 at 08:50 PM

Hey Jansgreen-

Please create a new post for your question as this is not related to the original question asked on this post. This helps keep information for different issues from being lost within the context of another question.

(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