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 thanks for any help
asked Oct 20 '16 at 11:51 AM in Blueprint Scripting
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.
answered Oct 21 '16 at 04:10 PM
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
answered Oct 20 '16 at 12:45 PM
how do I send an actor to different levels?
answered Apr 18 '17 at 07:33 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here