我想试试amethyst_physics库来做一个游戏。(嗯)我以身作则,但总有一天我不工作:
use amethyst::GameDataBuilder;
use amethyst_physics::{PhysicsBundle};
use amethyst_nphysics::NPhysicsBackend;
fn main() -> amethyst::Result<()> {
amethyst::start_logger(Default::default());
let game_data = GameDataBuilder::default()
.with_bundle(
PhysicsBundle::<f32, NPhysicsBackend>::new()
)
;
Ok(())
}错误:
the trait bound `amethyst_physics::PhysicsBundle<'_, '_, f32, amethyst_nphysics::NPhysicsBackend>: amethyst::amethyst_core::SystemBundle<'_, '_>` is not satisfied
the trait `amethyst::amethyst_core::SystemBundle<'_, '_>` is not implemented for `amethyst_physics::PhysicsBundle<'_, '_, f32, amethyst_nphysics::NPhysicsBackend>`这里就是一个例子。
我做错了什么?
发布于 2020-12-04 17:41:37
这似乎是个窃听器。它成功地使用amethyst版本0.15.1而不是0.15.3编译。在补丁更改过程中,不会出现这样的回归。
amethyst使用amethyst_core版本0.15.3 (其中定义了SystemBundle ),而amethyst_physics使用amethyst_core版本0.10.1。
我在紫水晶存储库上注册了一个问题。
将此用作解决方法:
amethyst = { version = ">=0.15.0, <0.15.3", features = ["empty"] } https://stackoverflow.com/questions/65145954
复制相似问题