Comments (7)
- What are your
dt
values? Chipmunk works better if dt is actually a constant. - Try going through all shapes, not just active ones. I can't remember what the rules are around active / non-active shapes.
- Are you getting non-smooth values out of the shape? I have no idea what your sprite library does - is it correct?
Failing that, you'd be better off asking on the chipmunk forum. Scott is a better person to ask than me.
from chipmunk-js.
@josephg My dt
values are not constant (though are very very small floats). The problem is definitely coming form the position changes in chipmunk. The difference between each position is as big as 5-10 units which causes the strange jumping.
I'll try some more things then ask Scott on the forums.
from chipmunk-js.
Changing my time-step to be constant yeilded good results, though it still doesn't seem as smooth as it should be.
I posted on the forums here: http://chipmunk-physics.net/forum/viewtopic.php?f=1&t=3169
from chipmunk-js.
Oh - is your rendering happening smoothly? How are you rendering?
from chipmunk-js.
I'm rendering via WebGL and my fps/rendering is fine. I debugged for days before coming to the conclusion it had to be chipmunk (or my implementation of it). Objects moving around that are not simulated by chipmunk are all smooth, it is only when i try to move something in the method above that I get a strange jumping effect.
from chipmunk-js.
Ok, then yeah - see what scott says.
On Fri, Jan 24, 2014 at 3:14 PM, Chad Engler [email protected]:
I'm rendering via WebGL and my fps/rendering works fine. I debugged for
days before coming to the conclusion it had to be chipmunk (or my
implementation of it)—
Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-33270982
.
from chipmunk-js.
Seems I fixed the issue by completely separating my render loop and physics simulation, plus used a constant step for physics.
from chipmunk-js.
Related Issues (20)
- Possible optimization: Array-based vectors HOT 4
- regarding Collision Callback HOT 4
- Does not pass google closure advanced mode HOT 4
- Implement segment collision detection HOT 2
- Emscripten HOT 11
- Probably wrong context in SpatialIndex.prototype.collideStatic HOT 4
- Typescript Type Definitions? HOT 4
- Performance boost 10-16% HOT 2
- Bug in Node js HOT 2
- Could you add a Demo branch that can access via Github HOT 2
- Old engine (node 0.6.5)
- Cannot move static bodies.
- BBTree 'count' property overrides 'count' method
- RotaryLimitJoint.prototype.getImpulse is missing the 'joint' argument
- NoCollide collides. HOT 3
- Demo link off
- Cannot create a body
- Body.applyForce is mis-implemented as Body.applyImpulse
- Native JS Bindings for Chipmunk HOT 1
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 chipmunk-js.