andreacatania / amethyst_physics Goto Github PK
View Code? Open in Web Editor NEWAmethyst physics engine abstraction layer
License: MIT License
Amethyst physics engine abstraction layer
License: MIT License
I get this error:
error[E0277]: the trait bound `PhysicsBundle<'_, '_, f32, NPhysicsBackend>: SystemBundle<'_, '_>` is not satisfied
--> src\main.rs:227:22
|
227 | .with_bundle(PhysicsBundle::<f32, NPhysicsBackend>::new()).unwrap()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `SystemBundle<'_, '_>` is not implemented for `PhysicsBundle<'_, '_, f32, NPhysicsBackend>`
And I import these types in as such:
use amethyst_physics::PhysicsBundle;
use amethyst_nphysics::NPhysicsBackend;
The reason why I do that is because I think NPhysicsBackend
was moved out of amethyst
a while ago. Any clue what's up?
I'm in need of using the rustsim salva2d and nphysics2d libraries. It seems like the amethyst_physics nphysics back end only supports nphysics3d. I'm thinking about adding a back end for salva2d and nphysics2d. Should I expect any significant challenges with this, or should it be straight forward to follow the pattern set by the amethyst_physics nphysics back end?
You should be able to use a feature named something like "backend-nphysics
" to have NPhysicsBackend
included directly in the crate (for convenience).
Is it possible to add a RigidBodyDesc and ShapeDesc to a component in a prefab ron file?
Hi! I have tried to extend your example with falling cubes amethyst_physics_test
with a flat terrain mesh instead of the floor.
Terrain mesh is a 8.0x8.0 sqare built from 128 triangles. I've also prepared a ShapeDesc for it from the same vertices and indices.
Here comes the first question: MeshBuilder and ShapeDesc::TriMesh expect vectors with different content:
error[E0308]: mismatched types
--> src/terrain.rs:63:21
|
63 | points: pos,
| ^^^ expected struct `nalgebra::geometry::point::Point`, found struct `rendy_util::types::vertex::Position`
|
= note: expected struct `std::vec::Vec<nalgebra::geometry::point::Point<_, nalgebra::base::dimension::U3>>`
found struct `std::vec::Vec<rendy_util::types::vertex::Position>`
error[E0308]: mismatched types
--> src/terrain.rs:64:22
|
64 | indices: idx,
| ^^^ expected struct `nalgebra::geometry::point::Point`, found `u16`
|
= note: expected struct `std::vec::Vec<nalgebra::geometry::point::Point<usize, nalgebra::base::dimension::U3>>`
found struct `std::vec::Vec<u16>`
How it is intended to do? At this moment I simply fill out two more vectors with the same values, but it does not feel right
And second thing is that as soon as I do it, it works as expected, but I have a heavy FPS drop when cubes collide. Any idea from what point should I start my investigation?
Methods for adding systems to PhysicsBundle
should accept &str
and &[]
, in stead of String
and Vec
, to be consistent with Amethyst.
Dependencies does not work between systems added to GameData
and systems added to the physics bundle, for example using PhysicsBundle::with_pre_physics()
.
This makes it very difficult to use the input bundle, for example, as there is no obvious way to get input_system to run before any character controllers that are added to the PhysicsBundle
in stead of GameData
...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.