Crates.io | bevy_fabrik |
lib.rs | bevy_fabrik |
version | |
source | src |
created_at | 2024-10-23 01:10:56.03202 |
updated_at | 2024-11-01 00:51:54.294335 |
description | IK solver for Bevy using FABRIK algorithm |
homepage | |
repository | https://github.com/Kilbukas/bevy_fabrik |
max_upload_size | |
id | 1419517 |
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` |
size | 0 |
An implementation of FABRIK inverse kinematics algorithm for Bevy game engine.
Disclaimer: multi-chain support is not implemented yet.
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.
Bevy | bevy_fabrik |
---|---|
0.14 | 0.1 |
Dual-licensed under either:
at your option.