Comments (4)
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.
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.
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.
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)
- Perpetuum mobile)
- TypeScript declarations HOT 3
- RigidBody_X? HOT 1
- d.ts file build failed
- support torus for oimo HOT 2
- Body names are duplicated. HOT 1
- Is it possible to move a Rigidbody without using force? HOT 1
- Want the update example about magnetic force
- How to move a ridgidbody without them bumping up over eachother HOT 1
- Exporting a mesh into a 3D file?
- Contact detection bugs with kinematic bodies
- Importing an .stl file in as a rigidbody.
- How to visualize a physic object in the scene?
- Impossible to "lock" a body after ?
- Wrong Ineria of Cylinder about Y axis
- Contact callback HOT 2
- Differences between joint constraints.
- Documentation? HOT 3
- Importing convex mesh types to a world
- What design pattern is used by oimo.js? ECS mode? Component mode?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oimo.js.