liabru
liabru
Hopefully my last post helped you resolve your issue, so closing this. Feel free to reply if you need more help.
How quickly does it lose energy? I realise conservation isn't exactly perfect at the moment, which is a bit of a problem, but hopefully it takes a while? Can you...
Thanks for the example. It's pretty quick indeed, I will investigate this. I expect it may be due to floating point errors but it does seem a little quick even...
Thanks for the test case. My guess is that at least some of the loss is due to floating point errors (it seems that [even box2d has the same issue](http://www.iforce2d.net/b2dtut/gotchas#losespeed))....
Interesting. Maybe try using [Bodies.polygon](http://brm.io/matter-js/docs/classes/Bodies.html#method_polygon) with a high number of sides (like 50) to see if that helps.
@karimshalapy thanks for sharing! This is still on my list of improvements I'd like to make (quite a long list though!) For now my suggestions are the following as discussed...
@lout33 good point I think that could help! Only thing is it will apply globally to all bodies, but probably reasonable if you don't need resting collisions or if they...
Sounds like you managed to get around this I hope? It's usually the case that different libraries use different origin points. Matter.js needs to shift the vertices to be orientated...
You can get something close using the chamfer feature on a rectangle, check out the [rounded corners](http://brm.io/matter-js/demo/#rounded) example.
Yea there's an approximation, try using the chamfer option on `Bodies.rectangle`, as used in the [rounded corners](http://brm.io/matter-js/demo/#rounded) example.