Coder Social home page Coder Social logo

Update collider verticies about bevy_xpbd HOT 3 CLOSED

jondolf avatar jondolf commented on May 19, 2024
Update collider verticies

from bevy_xpbd.

Comments (3)

Jondolf avatar Jondolf commented on May 19, 2024 1

To clarify, I think you can get a mutable reference to a trimesh collider's internal shape like this:

// This mutable variant of get_shape doesn't exist yet but I'll add it now
let shape = collider.get_shape_mut().as_trimesh_mut().unwrap();

It returns a GenericTriMesh, but vertices is private and I'm not seeing a way to get a mutable reference unless I'm missing something.

from bevy_xpbd.

Jondolf avatar Jondolf commented on May 19, 2024

I'm not super familiar with Parry's internals, but I'm not sure if it's currently possible to modify the trimesh shape without creating a new trimesh instance, as I'm not seeing any methods for doing that in SharedShape or TriMesh. As far as I know, the shape has to be replaced with a new one if you want to change the geometry.

from bevy_xpbd.

Shatur avatar Shatur commented on May 19, 2024

Got it, should be reported to Parry then.

from bevy_xpbd.

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.