Giter Club home page Giter Club logo

Comments (6)

sebcrozet avatar sebcrozet commented on May 18, 2024 1

@Kerosene2000 No, it is not yet possible. There are still two features related to CollisionGroups to be implemented:

  1. Allowing the user to pass its own collision group to the physics engine at rigid-body construction time. This should be implemented soon.
  2. Allowing the user to change the collision group of a rigid body after it has been added to the scene. This one involves some intricate development on ncollide so it is much more complicated and won't be added in the very short term.

from nphysics.

sebcrozet avatar sebcrozet commented on May 18, 2024

Currently static bodies will report collisions but will trigger no force. A mechanism to filter collisions already exists on ncollide (cf. CollisionGroups) though they are not completely exploited by nphysics yet.

In the mean time, a work-around may be to test if the collisions that were reported to you involve only static rigid bodies (for which the rigid_body.can_move() method will return false).

from nphysics.

WaDelma avatar WaDelma commented on May 18, 2024

The problem is not that I want to detect if the colliding bodies are static, but that if I have lots of static bodies colliding it will slow down the simulation to crawl.

from nphysics.

Kerollmops avatar Kerollmops commented on May 18, 2024

@sebcrozet You probably just answer to my question in the message above, is it possible to use the CollisionGroups struct when adding a body to the world ?

It seems that .add_body() already fix collisionGroups, which gives a real world physic...

from nphysics.

Kerollmops avatar Kerollmops commented on May 18, 2024

I am actually working on a project that will need the collisionGroups at the rigid body creation.
What means soon for you ?

If you want, you can let me work on the code in progress, if you don't have time, I will be glad to work on this crate !

from nphysics.

sebcrozet avatar sebcrozet commented on May 18, 2024

@Kerosene2000 I'd say soon equals a week or so. I wanted to have a first implementation of #20 before tackling this. If you want to give it a try, I've provided some outlines on the issue #55 I just created for that.

from nphysics.

Related Issues (20)

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.