bevy_fabrik

Crates.iobevy_fabrik
lib.rsbevy_fabrik
version
sourcesrc
created_at2024-10-23 01:10:56.03202
updated_at2024-11-01 00:51:54.294335
descriptionIK solver for Bevy using FABRIK algorithm
homepage
repositoryhttps://github.com/Kilbukas/bevy_fabrik
max_upload_size
id1419517
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Tomas Seniƫnas (Kilbukas)

documentation

README

bevy_fabrik

An implementation of FABRIK inverse kinematics algorithm for Bevy game engine.

example

Disclaimer: multi-chain support is not implemented yet.

How to use

Add InverseKinematicsPlugin to your App:

app.add_plugins(InverseKinematicsPlugin);

Add IkChain component to the last entity (tail) of a chain of entities you want to control:

commands.entity(chain_tail).insert(IkChain::new(joint_count));

Note that IkChain will calculate bone lengths based on the distance between entities in the chain when inserted, so make sure the entities and their transforms are set up correctly before inserting it.

Finally, update IkChain's target field as needed to solve the chain towards it. For a more complete example, see examples/basic.rs.

To add joint constraints, insert TwistConstraint and/or SwingConstraint components to the entities within the chain, and they will be applied during chain solving.

Compatibility

Bevy bevy_fabrik
0.14 0.1

Alternatives

License

Dual-licensed under either:

at your option.

Commit count: 6

cargo fmt