Comments (8)
This may depend on your particular setup.
Can you provide a jsfiddle please?
from matter-js.
http://jsfiddle.net/wafo2qga/1/
It's used to be C/S structs. Matter.js running on my server and send frame data to a browser. The task of the browser is to draw frames. So the code is strange.
http://203.195.196.109:8899/game.html
from matter-js.
It looks like you're only applying a (small) force for a single frame?
I think you need to apply a bigger force over a number of frames to get the acceleration you're looking for.
But actually, what you probably need to use is Body.setAngularVelocity
which is instantaneous, where as forces are much slower acting.
from matter-js.
No.. You didn't get my point.
http://jsfiddle.net/wafo2qga/2/
Body.applyForce(boxA, Vector.add(boxA.position,{x:80,y:0}), {x:0,y:-0.5});
A 'small' force let the box jump so high without any rotation. Isn't it abnormal?
from matter-js.
I do get your point, it does seem a little strange that there's no rotation given the change in linear velocity.
So there may be an issue with angular force application. I'll investigate further, thanks.
from matter-js.
I ran into this issue today too. Fix seems to be to remove * body.inverseInertia
from Body.js:570.
Based on my rather limited understanding, this makes sense based on the physics because the torque isn't proportional to inertia, however the angular momentum that results from it is.
from matter-js.
Wow, I was having so much trouble getting things working, I thought it was because I didn't understand what was going on, but turned out by removing * body.inverseInertia everything makes sense now !
Is the bug still here? Or is it just me?
from matter-js.
Fixed in the latest master build, thanks guys.
from matter-js.
Related Issues (20)
- Chain connecting 2 players causes 1 player to accelerate slower than the other even with same force
- Render.setSize is not present in the build
- Trying to change seed, to take control of deterministic behavior
- How to suppress body tremors? HOT 2
- Why does the attractor only work on one of the two BODYs? HOT 1
- Using compound bodies with Bodies.fromVertices does not work it just shows a filled in shape. HOT 1
- Why don't bodies sometimes collide? HOT 1
- Constraints with distance limits (e.g. for ropes)
- Why might there be such an error? HOT 1
- Simple Polygon Physics Issues HOT 1
- How to add project to the Wiki gallery ?
- How to scale the world? HOT 2
- [Phaser 3] Position of matter sprite's image not correct in container HOT 1
- loss of sprite quality on mobile HOT 1
- `Composite.translate` didn't move the bodies included
- Create Matter.Bodies.fromVertices with rounded vertices
- MouseConstraint preventing clicks on buttons on mobile. HOT 2
- Vulnerability related to the formula of universal gravitation
- Body with high mass and low inertia behaves erratically
- The startdrag event of dragging a body does not trigger after losing focus.
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 matter-js.