PathBerserker2d  1.0
Platformer pathfinding solution
Corgi

So, you want to use this asset with Corgi? Lucky for you, this asset includes an integration for Corgi!

What does Corgi support mean?

NavAgents move using a simple system of direct transform manipulation. This works fine in most cases, but if you where to plop one of these NavAgents in a Corgi environment, you would find it ignoring the environment completly. It won't react to ground friction, or jump pads, or knockback from weapons.

Thats very restricting!

Corgi-integration is all about letting the navagent follow a path using Corgis build-in movement system, for full environment interaction.

Features

The Corgi implementation supports the most common movement options:

  • walking
  • jumping
  • falling
  • climbing

Additionally, this asset comes with the following AI actions and decisions to be used with Corgi's build-in AI system.

Actions:

  • move towards closest target
  • move towards target
  • move towards random target
  • patrol
  • look at target

Decisions

  • has reached goal
  • pathfinding failed

Unsupported Features

Because Corgi uses pseudo physics based movement not everything, that a transform-based agent can do, a Corgi agent can do as well.

Unsupported features and limitations:

  • 360° movement Sadly agents will not be able to move on walls and ceillings. The gravity direction is fixed to being down.
  • No build-in teleportation support This is more a Corgi-limitation than a PathBerserker limitation. Teleportation nodes in Corgi do not allow agents to choose whetever they want to use a teleporter or just pass it by. The pathfinder however assumes teleportation to be a deliberate action. Because of this, there is no build-in support for teleportation yet.
  • No build-in elevator support Elevators as a concept do not exist in Corgi. Thus, there is no build-in support for them. Use moving platforms instead.

How do I use this integration?

Easy, replace the 'TransformBasedMovement' component on your NavAgent with a 'CorgiBasedMovement' component.

'CorgiBasedMovement' requires a normal Corgi character with at least the following components and abilities:

  • CorgiController
  • Character
  • CharacterHorizontalMovement
  • CharacterJump
  • CharacterLadder

For a working example setup please see the demo level included in the Corgi folder.

Tipp: When using Corgi demo characters, the gameobject the NavAgent is on should be positioned at a characters feet. In Corgi's example characters, the root GameObject is placed some where in the middle of the character. This needs to be adjusted.

Tipp: A Corgi character does not stop instantly, but will deaccelerate over a short period of time. This can lead to agents falling of platforms, if their goal is close to an edge. To enable instant stopping, please enable 'Instant Acceleration' on the 'CharacterHorizontalMovement' component.