{"id":15023209,"url":"https://github.com/rubengrim/bevy_xpbd_interp","last_synced_at":"2025-10-26T16:30:58.080Z","repository":{"id":197945810,"uuid":"699454362","full_name":"rubengrim/bevy_xpbd_interp","owner":"rubengrim","description":"A simple library for interpolation of bevy_xpbd rigidbodies","archived":false,"fork":false,"pushed_at":"2024-04-13T16:53:49.000Z","size":24,"stargazers_count":17,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T05:34:27.334Z","etag":null,"topics":["bevy","game-development","physics"],"latest_commit_sha":null,"homepage":"https://crates.io/search?q=bevy_xpbd_interp","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rubengrim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-02T17:03:50.000Z","updated_at":"2024-10-25T16:02:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"280e00b2-ffa5-48a6-b7a7-c18bd07dec8e","html_url":"https://github.com/rubengrim/bevy_xpbd_interp","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"5a047d939f04aa22d7dd67aa627b7ee91efbd3d6"},"previous_names":["rubengrim/bevy_xpbd_interp"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubengrim%2Fbevy_xpbd_interp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubengrim%2Fbevy_xpbd_interp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubengrim%2Fbevy_xpbd_interp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rubengrim%2Fbevy_xpbd_interp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rubengrim","download_url":"https://codeload.github.com/rubengrim/bevy_xpbd_interp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238366809,"owners_count":19460189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bevy","game-development","physics"],"created_at":"2024-09-24T19:58:50.260Z","updated_at":"2025-10-26T16:30:57.775Z","avatar_url":"https://github.com/rubengrim.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n**Bevy XPBD Interp** is a simple library for interpolation of [bevy_xpbd](https://github.com/Jondolf/bevy_xpbd/) rigidbodies. It operates by interpolating between the position/rotation of the current and previous physics states based on how much time has accumulated since the last physics update. The interpolated value is stored in the `Transform` of some separate entity that may hold meshes/cameras etc. Physics objects essentially need to be split up into one entity being affected by physics, and one entity being rendered.\n\nIn a lot of cases interpolation makes a noticeable difference at normal/higher physics update frequencies, eg. 60hz, but you'll see perfectly smooth movement even at 1hz.\n\n\u003e Note: `bevy_xpbd` is split into a 2d and a 3d crate. This library does the same and is split up into `bevy_xpbd_2d_interp` and `bevy_xpbd_3d_interp`.\n\u003e \n\n### Usage\nAdd `bevy_xpbd` and `bevy_xpbd_interp` as dependencies:\n```toml\n[dependencies]  \nbevy_xpbd_2d = \"0.4\"\nbevy_xpbd_2d_interp = \"0.1.2\"\n# or\n[dependencies]  \nbevy_xpbd_3d = \"0.4\"\nbevy_xpbd_3d_interp = \"0.1.2\"\n```\n\nThen add `XPBDInterpolationPlugin` to your app:\n```rust\napp.add_plugins(XPBDInterpolationPlugin);\n```\nNow you can add the `InterpolatedPosition` and/or `InterpolatedRotation` components to any entity with a `Transform`:\n```rust\n// The entity being affected by bevy_xpbd\nlet physics_entity = commands\n    .spawn((\n        RigidBody::Kinematic,\n        Position::default(),\n        Rotation::default(),\n    ))\n    .id();\n\n// Rendered box that uses the interpolated position/rotation\n// NOTE: The interpolated entity needs to have a `GlobalTransform` to work properly. Here it's included in the `PbrBundle`.\ncommands.spawn((\n    PbrBundle {\n        mesh: mesh_assets.add(Mesh::from(shape::Box::new(1.0, 1.0, 1.0))),\n        transform: Transform::default(), \n        ..default()\n    }, \n    InterpolatedPosition::from_source(physics_entity),\n    InterpolatedRotation::from_source(physics_entity),\n));\n```\n\nSee `'crates/bevy_xpbd_2d_interp/examples/box_2d.rs'` and `'crates/bevy_xpbd_3d_interp/examples/box_3d.rs'` for full examples. Run them with `cargo run --example box_2d/box_3d`.\n\n### Supported versions\n\n| Bevy | Bevy XPBD | Bevy XPBD Interp |\n| ---- | --------- | ---------------- |\n| 0.13 | 0.4       | 0.1.2            |\n| 0.12 | 0.3.2     | 0.1.1            |\n| 0.12 | 0.3.1     | 0.1.0            |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubengrim%2Fbevy_xpbd_interp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubengrim%2Fbevy_xpbd_interp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubengrim%2Fbevy_xpbd_interp/lists"}