Move owning actor in an actor component on a curve from A to B?

My ability system uses actor components. I’ve a Leap ability. Timelines can’t be used in actor components. So far what I’m doing is toggling on tick then interp moving the actor to the destination, but I need to do this on a curve. It’s also unreliable as I’m moving them towards a destination and having to check for distance with tolerance and sometimes the actor gets stuck. Does anyone have any suggestions? Hitting a bit of a wall with this.

Seams like I’m getting closer to figuring it out.

I attached a spline component to the owning actor and am trying to move along the spline during tick, but I can’t seam to figure out how to make the actor stop when they reach the end of the spline. Have checked 4 different tutorial videos and just doesn’t seam to be doing the trick. I can see the spline points being correctly set in world positions in the debug display and the actor does move towards it properly, but never stops despite doing distance to spline length checks.

Sounds to me like you should just be using root motion…

Hey @Krileon!

How do you feel about using “Suggest Projectile Velocity Custom Arc” to get an arc and output vector/launch speed and then “Launch Character”? Would that possibly suit your needs?

Nope, this isn’t being done with an animation.

Calculating the curve isn’t a big deal. It’s making sure the character stops when reaching the destination properly.

I currently have the spline attaching and creating with the correct points, but for some reason the movement doesn’t stop properly.


This is what I’m currently doing. Leap Land will turn off tick, but for some reason I keep overshooting the distance check. Not sure what I’m doing wrong here exactly.

I basically just need to move the actor along a spline and stop when they reach the end of the spline, but I need to do so on tick. I can’t use a timeline as this is inside of an actor component.

Edit: I think I see the problem. Getting the distance of the actor along the spline is always returning 0. Calling some wrong functions here I think because there’s a freaken bajillion of them for splines and documentation (lol) for UE is probably the worst in existence (because repeating the function name to you is helpful..).

Ah, the spline is attached to the actor so it’s moving with the actor. That might be why the distance checks are all messed up. So I probably need to spawn the spline in and not attach it? All of my points are world space though. Still can’t understand why GetDistanceAlongSplineAtLocation for the actors location is always coming out as 0.

Edit: Ok, confirmed the spline is moving with the actor so that’d be the problem.

Got it working with my original non-spline solution. My issue was the Z axis in some cases of my destination vector was calculating wrong causing distance checks to be incorrect or cause the actor to get stuck. Fixed the inconsistency and now is solved.