Body: Gravity Scaling
See original GitHub issueIs there a way to set the gravity scale?
If not, I would like to suggest something like:
gravityScale: 2
would make it have twice the gravity (falls twice as fast)gravityScale: 1
would be the default (runs as it currently does)gravityScale: 0
would make it so gravity doesn’t affect the body (at least visually)gravityScale: -1
would make it have an inverse of the default gravity (like a balloon with helium)gravityScale: -2
would make it have twice the inverse of the default gravity (rises twice as fast)
I am no expert on the math, but wouldn’t adding * gravityScale
to these lines in the update
be the solution? https://github.com/liabru/matter-js/blob/63b02cfbeebe93d28082504f5e89e93f98739743/src/body/Body.js#L581-L583
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
GRAVITY EFFECTS IN SMALL - DTIC
clept is to use Froude scaling which accepts a gravitational acceleration scale factor of unity, but requires the ratio of the stress and...
Read more >Does the force of gravity scale? - Quora
That means, all bodies, even tiny molecules exert a gravitational force. However, the strength of this force depends significantly on how massive the...
Read more >Gravity Scale | Physion
As the name suggests, the gravityScale property of a body can be used to "scale" the gravitational attraction applied to it.
Read more >(PDF) Scaling body-related action in the absence of gravity
PDF | We investigated the role of visual eye-height in the detection of affordances in weightlessness. Sixteen participants were tested in ...
Read more >Impact disruption of gravity-dominated bodies: New simulation ...
From these we derive a simple scaling law predicting the conditions for catastrophic disruption. •. Disruption is expected when kinetic energy ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve added in the gravity scale and it’s doing just what I want it too.
@kuiash I suggest just disabling the built in air friction and gravity and then applying your own forces as needed.