Jump to Player Character Location

I currently have an enemy that has a move where he jumps a certain length, but I’d like the jump to get the player’s current location, and jump there, I’ve tried to get it with the player’s location, but I’m not sure on how to proceed with that, so I have the basic in the screenshot, this just launches the character forward, it gets my rotation (because of another function I have), but it obviously doesn’t go to the player’s location.

See 1:69 for what I mean:

Thanks by the way.

Try to use GetDirectionVector as direction for jump.

Where in the BP would I use that?

I think instead of up and forward vector. Enemy location and player location will give you direction vector for jump.

I suppose I shouldn’t be adding them though right? Because that gets me some weird locations.

So to get your player likely you can do “get Player Character” then “Get Actor Location” from that…
Plug that into the “End Location” on the “Suggest Projectile Velocity” node…start Location will be just a “Get Actor Location” node left to “self”
Play Around with your Launch Speed Until desired result (I’m looking at old code set to 2,500 so there’s a start point for you), override gravity likely isn’t necessary, Trace if you worry your BossChar will hit something on the way to your player character (no worries if you have an open area to fight in otherwise), Collision Radius is for the size of that Trace IF you decide to do one (so likely not needed), Favor High Arc is like an granny shot in basketball…underhand toss that falls on the spot, and lastly draw debug draws ummm…the debug (can’t really explain that more that it already does lol)…
The Suggested Velocity will go into your “Launch Velocity” on that “Launch Character” node you’ve already got up there…

I had major problems with this years ago not always returning a good result so I could not use it due to it glitching out my player 1/10 times…that’s not an acceptable glitch rate…so just heads up test and test and test to make sure it’s all good now…

If it is not How I did this (I have a boss who tries to jump on the player) is I animated a simple up and down jump for my boss (no root movement) and I play that, I get Player location and store it in a variable, then I use a Timeline of like .5secs to Lerp from Boss location to the Stored Variable Player location…Looks like a jump and is always reliable in both getting there and in the same time (allowing the player to have a reliable dodge reaction)…

Hope this helps…let me know if you’ve questions…

2 Likes

The debug arc shows exactly what I want, but the character is not launching, should I be setting the Toss Velocity to the Launch Velocity on the Launch Character node? I’ve tried that but nothing seems to change.

For sure plug the toss velocity into the Launch Velocity…Check True to both Overides as well in hopes of getting consistent launches…
To debug place a Print string in between “SuggestProjectileVelocity” and “LaunchCharacter” from that “Return Value” and make sure you’re getting a True…if not it’s likely having a problem with the “Arcane” actor…
If all checks out lastly put an extra zero on that “Launch Speed” it’ll be waaaay too much but it’ll verify that you just need to up the Speed to get it to work…your character may be much heavier than mine…

The character is launching well, but it’s stopping almost at the end (it doesn’t come in contact with the player), does that got anything to do with the trace?

you can boost the velocity a little to get that actor there but this is the kinda unreliable jump stuff that made me not take this route…so if there is a way to solve the toss velocity not always getting the actor to the location correctly I do not know how to solve it other than using lerps and timelines…

Thanks for the in depth explanation and your experiences!