Enhanced AI Movement - a plugin for smooth and a more natural AI movement

Hi everyone,

I’m happy to introduce my plugin, Enhanced AI Movement!

I originally created this plugin because the animals in our game were moving in a very unnatural way, their movement felt robotic, especially when turning. It’s possible to improve this with lots of tricks and animation tweaks to make this less noticeable, but that takes a lot of time, time we don’t have as a small indie team.

That’s when Enhanced AI Movement was born: a plugin that lets you dramatically improve your AI’s movement in just a few clicks. It addresses many common AI movement issues, such as stiff turns, linear speeds, lack of turn radius options, getting stuck on dynamic obstacles, blocking each other in crowded spaces, and floating on slopes.

Links

Fab Link | Showcase | Documentation | Discord

Features

  • A spline path-following component extends Unreal’s default path following component by creating customizable spline trajectories instead of linear segments. The parameters allow you to adjust the shape and size of the turn radius or add zig-zags of varying sizes and frequencies while still using the default pathfinding on navmesh.

  • AI Push System : An AI push system has been introduced in v1.4.0, allowing AIs to push each other to prevent them from getting stuck in crowded spaces. The system also transfers forces between AIs, making their movement more natural and crowd-like.

  • Sphere AI Push Component : An actor component that you can add to your player (Standalone mode only) to push AIs while moving whether the AIs are moving or not.

  • Dynamic obstacles real-time avoidance : Uses simulated sensors to make AIs smoothly avoid most dynamic obstacles, such as physics objects moved by the player, moving platforms, or vehicles without them being on the Navmesh.

  • Avoidance System for pawns : the plugin has a custom implementation for Pawn avoidance reusing the sensors (which replaces RVO or the Detour Crowd Manager) allowing AIs to avoid each other smoothly. Each AI is assigned a random priority so that some slow down to let other AIs pass.

  • Navmesh validation: The generated splines are checked and modified before being finalized to ensure they always stay on the navmesh. The plugin includes checks to verify that all spline points remain connected.

  • Quadruped IK Control Rig : Applies a full-body rotation pass before the full-body IK to ensure animals maintain a natural posture on slopes and don’t appear to float.

  • Biped IK Control Rig : Ensures bipeds stay on the ground on slopes and dynamically bends the spine forward or backward, simulating balance adjustments.

  • Spine & Tail Control Rig : Bends the animal AI’s spine and tail procedurally while turning. Simplify your animals AI animation blueprint, by replacing most of your turning animations with one or two control rig nodes.

  • Dynamic Speed : AI speed changes based on terrain slope (faster when going downard and slower upward) , slow down during turns, and random variations.

  • Dynamic Rotation Rate : AI rotates slower when moving slow and faster when moving fast to look more natural.

  • Root Motion Support: Option to use root motion animations, where forward movement is controlled by the animation and rotation is handled by the plugin’s spline path component.

  • Predefined AI Controller Presets :

    • Humanoids
    • Small Quadrupeds (e.g., rabbits, squirrels, rats, etc.)
    • Medium Quadrupeds (e.g., foxes, dogs, cats, wolves, deer, etc.)
    • Large Quadrupeds (e.g., bears, rhinoceroses, hippopotamuses, etc.)
  • Custom Data Asset Presets : Allow AI controller parameters to be shared between different AI types, even if they don’t have a common parent class and makes presets compatible with C++ AI Controllers.

  • Smart Spline Regeneration : Splines regenerate only when necessary to improve AI tracking of moving targets.

  • Optimizations :

    • Sensors and IK traces running at a low frequency rate.
    • The spline path system switching to default path following at a distance or when not rendered (standalone only).
    • Sensors deactivating when not rendered or at a distance (standalone only).
  • Compatibility : Works with ALS, EQS, and the Game Animation Sample Project. While future versions of the Game Animation Sample Project may introduce changes, the plugin has been tested with versions 5.4 and 5.5.

  • Coded in C++ : The plugin is coded in C++ (except for control rigs) but is not required to use the plugin, most parameters are commented and accessible in blueprints.

  • Non-Destructive Integration : Works by replacing the AI Controller, ensuring most of your previous AI-related code remains functional.

If you’re looking for a quick and easy way to make your AIs feel more believable, I think you’ll find it really useful! If you have any questions or feedback, feel free to ask.