Coder Social home page Coder Social logo

amethyst_physics's People

Contributors

andreacatania avatar kerkmann avatar type1j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

amethyst_physics's Issues

the trait bound `PhysicsBundle<'_, '_, f32, NPhysicsBackend>: SystemBundle<'_, '_>` is not satisfied

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?

Backends for salva2d and nphysics2d

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?

Physics for Terrain

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.