question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

setting `world.step(1 / 60)` gives a very slow movement

See original GitHub issue

Are all the demo setting world.step(1 / 60) ?

I use this in my gravity based program and I find the sprite moves very slow. I am using PIXI.js as the renderer and its ticker rate is 60 FPS I believe. If the world time step is unrelated to the frame rate how do I know what time step to use to get a smooth movement?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:19 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
gaurav-dixitvcommented, Mar 12, 2018

I know this is almost a year old now. But @crazyyi here is the modified code: https://jsfiddle.net/gauravdixitv/xkuyoo14/ (planck.js + pixi). In fact, @shakiba 's solution is the right way to do it - scale your rendering, not the physics.

0reactions
shakibacommented, Apr 7, 2017

It was less than a minute for me! I think it is reasonable to scale UI, not physics.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Strange slow movement in Box2D - C++ - Cocos Forums
I've got all set up ok in my project. But I've noticed a strange behavior - bodies are moving very very slowly. FPS...
Read more >
Want to Add 20-60+ Points to Step 1? Here's How Long It ...
Now that Step 1 is pass-fail, you may wonder how long it might take you to get to a passing score. It'd be...
Read more >
Troubleshoot slow queries on a dedicated SQL pool
Step 1: Identify the request_id (aka QID). The request_id of the slow query is required to research potential reasons for a slow query....
Read more >
Moving at constant speed - Box2D tutorials - iforce2d
While it often looks fine on the screen, setting the velocity directly means the body is not correctly participating in the physics simulation....
Read more >
UWorld For Step 1: Ultimate Guide To Get 250+ On Step 1
UWorld Step 1 Qbank is a comprehensive USMLE Step 1 tool comprising more than ... Working in different modes makes it easier to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found