Is it worth using Pawn class for AI character instead of Character class?

I’m designing an RTS game, where each Unit(Pawn) are controlled via their UnitController. These UnitController are controlled by the Player and because of this Unit class do not need the input capability of Character class.

Then navigation doesn’t seem to work with a non-CharacterMovementComponent.

I’ve spent nearly entire day porting CharacterMovementComponent to my custom movement component, but I can’t help but feel that I’m somehow fighting with the engine code.

Am I supposed to just use Character class and move on?

Similar answers:

UPDATE: You need to override and implement following

//BEGIN UNavMovementComponent Interface
virtual void RequestDirectMove(const FVector& MoveVelocity, bool bForceMaxSpeed) override;
virtual bool CanStartPathFollowing() const override;
virtual bool CanStopPathFollowing() const override;
virtual float GetPathFollowingBrakingDistance(float MaxSpeed) const override;
//END UNaVMovementComponent Interface
1 Like

If you need the CharacterMovementComponent, then just use a Character.

If you are using AI Blackboard for controlling characters, you just need to make sure it is a pawn or subclass of pawn, which Character is.

1 Like

Well once I realized that all you need to do is implement UNavMovementComponent Interface in movement component, it wasn’t that much work.

My rushed poorly written tutorial:

1 Like

you should update your question with the solution you found

1 Like