Giter Site home page Giter Site logo

Comments (4)

marcofugaro avatar marcofugaro commented on May 25, 2024 1

Thanks for the suggestion.

Your monkey patch makes the cross product evaluate to 0, and the tangents as well, thus disabling the compute tangents part of the Narrowphase? I don't know exactly what it's affecting.

Have you tried adjusting the contact equation and other world parameters instead? These ones:

// Tweak contact properties.
// Contact stiffness - use to make softer/harder contacts
world.defaultContactMaterial.contactEquationStiffness = 1e11
// Stabilization time in number of timesteps
world.defaultContactMaterial.contactEquationRelaxation = 2
// Max solver iterations: Use more for better force propagation, but keep in mind that it's not very computationally cheap!
world.solver.iterations = 10
// Since we have many bodies and they don't move very much, we can use the less accurate quaternion normalization
world.quatNormalizeFast = true
world.quatNormalizeSkip = 8 // ...and we do not have to normalize every step.

from cannon-es.

marcofugaro avatar marcofugaro commented on May 25, 2024 1

@cx20 Looks like by using those settings, the dominos behave like your original example.

Check out the live demo here: https://codesandbox.io/s/r3f-cannon-dominos-forked-ds0kv?file=/src/App.js

from cannon-es.

cx20 avatar cx20 commented on May 25, 2024 1

@marcofugaro Thank you for telling me the sample. My sample seemed to improve by changing the frictionEquationStiffness parameter.

https://codesandbox.io/s/r3f-cannon-dominos-forked-ds0kv?file=/src/App.js:722-752

frictionEquationStiffness: 1e2

from cannon-es.

cx20 avatar cx20 commented on May 25, 2024

Thank you for letting me know those parameters.
I will have to check the parameters a little more carefully, but I tried a little and didn't get the results I was expecting.

from cannon-es.

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.