Avian
Introduction
Avian is an ECS-based 2D and 3D physics engine for Bevy, a refreshingly simple data-driven game engine built in Rust. Avian prioritizes ergonomics and modularity, with a focus on providing a native ECS-driven user experience.
Getting Started
Getting up to speed with Avian is very straightforward!
First, add it as a dependency in Cargo.toml:
avian2d = "0.5" # For 2D applications
avian3d = "0.5" # For 3D applications
bevy = "0.18"Then, add PhysicsPlugins to your Bevy application:
use *;
use *;
new
.add_plugins
.run;
}Now, you can use the numerous components and resources provided by Avian to add physics behavior to your entities.
For example, turning an entity into a rigid body with a collider is as simple as adding the RigidBody and Collider components, and an initial velocity can be specified using LinearVelocity:
use *;
use *;
commands.spawn Dynamic,
sphere,
LinearVelocity,
));
}Pending
https://joonaa.dev/blog/06/avian-0-1
Estàs llegint una vista prèvia.
Inicia sessió amb Google per llegir la pàgina completa.
Inicia sessió amb GoogleAmb qualsevol compte de Google. Només et demanarem que acceptis les condicions del servei.