box2d.ts icon indicating copy to clipboard operation
box2d.ts copied to clipboard

Bad performance with `kinematic body`

Open finscn opened this issue 7 years ago • 3 comments

I create a demo 'Tumbler' for testing performance .

And I found a strange thing.

When I use kinematic body to the Tumbler outbox , the performance is bad. http://fatidol.com/phy-benchmark/box2d-ts-test.html?type=kinematic (40 FPS on my macbook)

When I use dynamic body + revolute joint to the Tumbler outbox , the performance is better. http://fatidol.com/phy-benchmark/box2d-ts-test.html (60 FPS on my macbook)

This result puzzles me : When & How should I use kinematic ?

finscn avatar May 05 '18 03:05 finscn

This experiment is interesting. I hope you don't mind I created a gist with the code as record in case your site is down :) .

https://gist.github.com/Nek-/d48853f93c8bde0592c92bab3da6af96

Nek- avatar Jun 04 '18 18:06 Nek-

@finscn Have you tried this on the C++ version? It sounds like it might not be specific to this port.

flyover avatar Nov 25 '19 21:11 flyover

I don't any thing about C++ . So I'm sorry I can't give any help

finscn avatar Dec 02 '19 08:12 finscn