Move to Location or Actor not working

Hello, I am creating a boss, that moves around to 9 predefined locations, I am using a Character Class for the BP, I set the gravity scale to 0, as I don’t want it to fall, so it is actually hard. Here is the uasset:
Ch1Boss.uasset (96.6 KB)

Hey there @JoeBox9! I’m unable to use Uassets provided for a number of reasons, so we have to work together to solve your dilemma. Just from your description alone, I’ve got a couple of possible reasons it may not be working. As well as if none of them are correct, I also have some questions to help identify the issue.

In the Move To Location or Actor node, there is a Use Pathfinding bool. If this is ticked, and there’s an issue with them accessing the nav mesh (in your example floating) they wouldn’t be able to find a path to location.
image

If your boss has only walking as it’s movement type, turning it’s gravity off can have adverse effects on it’s movement. Try moving while he’s on the ground with gravity, if it works you’ll likely need to either change the movement mode to flying and configure it that way.

Is your nav mesh generated and capable of pathing this actor?

Could you stick a print on this pin of your node and see if it fails there?
image

May we have some images of the boss, blackboard, logic, etc?

I loaded up my project again, and the file from the content drawer was missing, in the Files app on my computer, I found it and then I deleted it to make a new one. When I tried to name it Ch1Boss, it said that it is already in use. So ignoring all of that I named it Ch1BossFinal, I disabled the pathfinding and it was spinning and printing, with On Request Failed. So I disabled it and it started moving, but that was with the function giving random locs being not called, so I connected it again and it started spinning but not printing with On Request Failed. I don’t have any of blackboard or things like that only the moving thing, which worked in a prev project. Also touching him makes the player fly in to the unreal void.




Final Boss may not use the same material but the same shape.

Where are you?

I see you get your positions from an array. How did you set those positions? Are they close to the navigation mesh?

I had gotten off work.

I was able to use lerp to make him move but I want to continue this issue as it may help someone else, and I may be able to solve issues in the future, like I did for AMD Drivers, on an another Forum.
It is just a square divided into 9 portions.
So
1: 0, 0, 0
2: 0, 900, 0
3: 0, -900, 0
4: 900, 0, 0
5: 900, 900
6: 900, -900
And so on…

No problem, let’s keep identifying the issue for you. So first up, we’ll look to the AI controller. Are you running this logic in the AI controller? Because if not there’s no path finder for it to determine it’s path. My AI controller looks like this (I chose a random location it can make it to so I didn’t have to write up the random locs):

Second, let’s make sure your boss is being possessed by the AI controller, and the correct one at that. This is the autopossess AI and the controller class it selects in the details of the boss actor:
image

Third, I notice you’re doing this on EventTick. Try to only do one at a time starting with begin play, then a delay between to give the actor time to make it to it’s target. If this fired every tick you’d never move because the constant changing of the target every frame.

Fourth, our movement component type matters. Are you using a character movement component, here’s some relevant settings:
image
image

After giving it an AI Controller, and using the same settings as your, it works but the player flies if he touches him.

Awesome! When characters collide they sometimes de-penetrate violently. It’s usually best to make your collisions to the enemy overlaps and handle knockback directly.

But he can’t move now

Did you disable all collisions? The only collision you’d have to change is with other pawns, don’t disable other collisions.

No I just made it overlap with him

It shouldn’t stop it’s movement unless there are hard collisions along the way. How did you set the overlaps? In the capsule component?

2 minutes ago, You reply at early morning here, anyways. I set it as pawn and then set it as BlockAllDynamic nothing happened My Sphere has 3 Scale and Collision Size is 150, if I set it back to 196, it moves again but very slowly or only rotates.

Sorry! My schedule is staggered and a bit all over the place. It sounds like you might be clipping something. Your pawn should still move or send the fail command regardless.

Is your player pawn physics based? Still wondering why it would be being launched, as de-penetration shouldn’t “launch” per se.

Yes he is. Sorry for being late

No worries, I’m here once every 10ish hours. Ahhhh that makes sense, so you can set your bosses collisions back the way they were before. The launching is coming from the physics impulse character movements send when hitting a physically simulated object. To disable it on your boss, disable this or tweak it’s knockback down:

image

1 Like

We meet at morning here or whatever time is there again. That solved, it after a lot of testing, because I was not sure. Thanks!

Hahah fantastic. Bonus tip: When working with non-physically simulated characters touching physically simulated characters, it’s always best to tweak these values or turn them off entirely and handle them via script directly. Since the physics system is separate from normal translations, you have to be explicit with it. Enjoy the rest of your day!

Hey, I am having similar issues with the AI controller in my game. I am making an AI bot that leads the user to certain quests and this is all under zero gravity. I noticed that when the gravity is normal, the ai leads the user to the quest perfectly. however, when I switch the gravity to zero gravity, the ai bot no longer moves al all. I am using the MoveToLocation method. Any help would be greatly appreciated