Giter VIP home page Giter VIP logo

Comments (4)

lo-th avatar lo-th commented on July 24, 2024 1

you can set mass in config.density
but the mass is set automatically you have to add
move = true for dynamique
or move = false for static
default is false

On Sat, Mar 14, 2015 at 7:46 AM, QuaziKb [email protected] wrote:

do you want to set it dynamically? you need to reference the rigidbody of
the oimo.body and call setupmass() on it after you change the densities of
all the contained shapes. it's kind of annoying right now but it's doable.
look at the constructor for setupMass, and how the rigidbody is then
initialized.


Reply to this email directly or view it on GitHub
#29 (comment).

LoTh - Freelance javascript / as3 / 3D
website http://perso.numericable.fr/chamaslot/ | blog
http://3dflashlo.wordpress.com

from oimo.js.

QuaziKb avatar QuaziKb commented on July 24, 2024

do you want to set it dynamically? you need to reference the rigidbody of the oimo.body and call setupmass() on it after you change the densities of all the contained shapes. it's kind of annoying right now but it's doable. look at the constructor for setupMass, and how the rigidbody is then initialized.

from oimo.js.

mohamed--abdel-maksoud avatar mohamed--abdel-maksoud commented on July 24, 2024

Thanks for the answers @QuaziKb and @lo-th !
I didn't set the config density in the initialization. I will set it and see if this helps.

from oimo.js.

mohamed--abdel-maksoud avatar mohamed--abdel-maksoud commented on July 24, 2024

OK, I managed to set the mass using the config parameter. It still didn't solve the original bug (I get NaN inverse inertia for some reason :/) but this is a different issue.

Thanks for your responses!

from oimo.js.

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.