Expand description

Wanderlust

Wanderlust is a character controller addon. Inspired by this excellent video and my previous attempts at creating a character controller, it is implemented on top of Rapier physics and highly customizable.

Wanderlust does not handle mouselook, as it’s more-or-less trivial to implement compared to movement, and would add significant complexity to build in as many projects will have vastly different requirements for mouselook. The first_person.rs example includes an example mouselook implementation.

To use Wanderlust, simply add the WanderlustPlugin to your App, and create an entity with the CharacterControllerBundle.

Planned Features

  • Wallrunning
  • Be more agnostic to up-vectors
  • More examples
    • 2D
    • Mario-Galaxy-style planetoids
    • Moving platforms
  • Fix various jitter issues

Potential Features

  • Become agnostic to physics backend?
  • Dashing?
  • Ledge grappling?
  • Input rework?
  • More bundles for different common configurations?

Contributions

Wanderlust is intended to cover nearly every possible use case of a character controller, so if your use case is not supported (or there’s a feature you would like to see) please drop an issue on the repository! PRs are also welcome, but I may not accept all PRs. Open an issue first if you’re not certain that I would accept.

Examples

The first_person.rs example which shows a simple character controller setup. The starship.rs example which shows a simple spaceship controller setup.

Dual-licensed under MIT OR Apache 2.0.

Structs

  • The recommended bundle for creating a character controller. Includes the necessary components for a character controller as well as many physics-related components that can be used to tweak the behavior of the controller. Try using the [Self::builder()] method to construct the bundle!
  • This is the interface for applying input to the character controller. See each field for more information.
  • Contains common physics settings for character controllers.
  • The settings of a character controller. See each individual field for more description.
  • The character controller’s state. This is the component responsible for adding controls to an entity. Requires [ControllerSettings], [ControllerInput], [GlobalTransform], and ExternalImpulse to work.
  • Spring parameters for a dampened harmonic oscillator.
  • Should WanderlustPlugin tweak physics rules to make the character controller work better? If not present, defaults to true. Must be added before WanderlustPlugin.
  • The character controller plugin. Necessary to have the character controller work.

Functions