Is the launch character node interrupted or overridden by "move to" commands?

Hi everyone, I’m organically just growing a sandbox where I try out new ideas and put them all together in order to learn UE4 scripting. Recently I’ve made two blueprints that I’d like to work together. One is a random direction jump pad, and the other is a simple ai that I can give a few different types of movement commands.

When my character runs on to one of these jump pads, he gets flung off in a random direction in a proper arc. However, when one of these ai characters hits the jump pad, he pretty much just gets a short burst in a forward arc and then floats downward in a vertical line. I took a video of the two behaviors I’m describing here: My Unreal Engine Progress 4 - Confused by jump pad effects - YouTube

Two things seem off to me here. First, I get flung in all sorts of different directions, but the ai always go up and forward. Second, they just float downward in that completely vertical motion. I have seen the ai get flung off in a proper way that I’d expect when I set a movement point directly on top of a jump pad. My thought is that the ai has essentially reached his destination in that case, and the movement command isn’t impeding the “launch character” node.

Is this a possibility? Is there a way to avoid it? I’ve also attached images of my jump pad blueprint and one of the movement functions that I use for the ai character. Thank you!

not sure if this is the answer but what I can see in the video and also a question is do you find yourself pushing a direction when you hit the pad and then still while in the air?

As I am sure the AI once it is set to falling state it just wait to land and does not attempt to control where which could be why it suddenly just stop traveling.

Check air control on your player and set it to zero and see if you can kind of get a similar effect if you immediately upon launch release all keys.

I had already set air control to zero for my character prior to the recording of the video and I don’t hold keys while I’m in the air so I don’t believe that that is the cause of what I’m observing. Thank you for the response and for bringing that up though.

Hi there,

We didn’t really test our AI movement code with “externally-induced” movement. This obviously should be handled, so the behavior you’re describing is a bug. I’d appreciate a lot if instead of PNG files you’ve attached your blueprint content’s copy-pasted into a text file - yeah, it works, and you can use it to share your BPs! :smiley:

Thanks for nailing this one down!

Cheers,

–mieszko

Hey mieszko,

I’ve attached two blueprints. One is the launchpad event graph, and the other is a function from my bot blueprint. When invoked, it will make the bot run towards the player. So just place a jumppad on the third person game template (low enough that the bot can run over top of it) and position it between you and a manually placed bot that has the function I’ve included. When he runs over it, you’ll see what happened in my video.

Alternatively, you can just put a target point on the ground (past the jump pad) and set up a level blueprint event that makes your player character run towards that point and onto the jump pad. The same thing will happen.

Please let me know if you need anything else from melink text

Sorry to comment on an old question but has there been any progress on this? I’m making a system where your attack knocks enemies back and whilst they are being issued move commands it breaks the launch/set velocity in much the same way as this.

I would appreciate an update on this as well! I have an issue with launch character as well (I still have a post on answerhub about it).

So I’m working on something that will address this properly, but for now you can use something else I just submitted (provided you’re willing to use code/binaries from github).

You’ll need to grab affected AIController's BrainComponent and call StopLogic on it, and RestartLogic afterwards. You may also need to manually stop AI’s movement with AIController::StopMovement since StopLogic does not result in aborting current movement.

Again, this is just a temporary solution, a proper fix is very complex and addresses a lot more than just this one issue.

1 Like

Dear Everyone and Mieszko,

#Character Falling/Landing Override Solution

I got around this issue by disabling pathing when the character begins falling, and resuming pathing when the character lands.

So I overrode Landed() and Falling() events in Character class

This provided me with a simple way to always know that when in the air, the pathing system would not interfere with normal perception of gravity / the character’s expected trajectory.

This is a video of me doing entirely C++ Calculations for jumping, all dynamic, no fancy jump nodes placed in the editor at all, just basic nav mesh volume, rest is C++

Thanks for the update, I work exclusively through blueprints so I don’t think these work arounds will be simple for me to use but for now I’ve been creating enemies that don’t use the typical path finding (instead using traces and launch character for simple slime type enemies for example) to tide me over until an update.

Do you think your changes to pathing will be ready for version 4.7?

Thanks again, and thanks Rama for sharing your methods as well

Unfortunately due to the UE4 release version cycle the soonest these fixed are going to make it in is 4.8.

Given 4.8 preview was just released I thought I should raise this issue again. Has there been any progress on this?

I haven’t been able to use the solution Rama posted as my projects are Blueprint only.

Bumped for relevance, still a known issue. Any news or additional workarounds?

Come on, you guys. This bug is still in 4.11.2.

4.11.2, issue is still present!

I’ve found workaround - right after AI launch change his movement mode to falling, like on screen below. It worked for me.

https://s31.postimg.org/ha402ry6z/AI_launch_override.jpg

4.13.2 this issue is still present! If I do the brain component and stop logic method, the AI behavior will be stuck in the task that has the launch character node. the change movement mode also does not work. Is there any other way to achieve AI dash or launcher?

Hi everyone,

We wanted to “push” an AI-controller character into the air with external forces, and have it consistently get launched into a nice arc. Rama’s and MieszkoZ’s workarounds pointed us in the right direction. Neither solution gave us the full answer, but combining the two seems to have done the trick. We used C++ for this solution - I haven’t fully researched whether it’d be possible to do using Blueprints only.

For the actual push / launch, use:

[Your CharacterMovementComponent]->StopActiveMovement();
[Your CharacterMovementComponent]->Launch(Direction);
[Your CharacterMovementComponent]->HandlePendingLaunch();

For the character being pushed, override Falling() in the Character class as below, then override Landed() similarly (fix the Super call and Activate instead of Deactivate):

Super::Falling();
auto aiController = static_cast<AAIController*>(GetController());
if (aiController != nullptr) {
	aiController->PathFollowingComponent->Deactivate();
}

I hope this is of some help to anyone else needing this workaround. Hoping to see this fixed properly sometime soon!

After days of struggling, I think this finally fixed my final issues with my AI’s custom movement (a frog, hopping). Just before I Launch Character, I do: CharacterMovement->StopMovementImmediately. Then I overrode Event OnLaunched to call StopLogic and then I overrode OnLanded to call RestartLogic. It appears to be working flawlessly now.