You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Physics run without a renderer so rendering is not the issue.
A single Matter.Engine.update(this.engine, UPDATE_FREQUENCY, 1); each single call takes randomly from 30 to 120ms! (i recorded the time right before and right after the matter js update function, so nothing else is responsible for it).
I have an event attached to "collisionStart", and i calculated all my custom code takes no more than 1 ms.
There are several thousand objects sparsley scattered throughout the world, most of them are not even moving and not even touching. enableSleeping: true is set in parameters in the engine constructor and it doesn't really change anything. There's nothing dramatic happening in the simulation in terms of any events.I tried to set every possible parameter in the constructor to be lower than a default value:
Objects are pretty simple. Basically a bunch of circles, occasionally regular polygons. Accuracy is not as important as stability, but with those seemingly arbitrary spikes with 70ms, 90ms, i cannot achieve the thing i need the most.
There's no gravity in the system, its scale is set to 0, so it's like a top-down view.
There must be a way to make it faster and smoother. Am i missing some very important setting in matter js?
Details on world contents:
World is the size of 10 000 per 10 000. There are around 5 thousand simple circles mostly not moving. Also there are objects that are essentially several 5 or 6 circles bunched together via simple constraints, but they never exceed the number of 200.
I understand that many objects need more time to process them. I don't expect anything instantenous. But there must be a stable ground. Realistically i cannot afford having an iteration taking more than 50 milliseconds to complete. i need an advice.
The text was updated successfully, but these errors were encountered:
Physics run without a renderer so rendering is not the issue.
A single
Matter.Engine.update(this.engine, UPDATE_FREQUENCY, 1);
each single call takes randomly from 30 to 120ms! (i recorded the time right before and right after the matter js update function, so nothing else is responsible for it).I have an event attached to "collisionStart", and i calculated all my custom code takes no more than 1 ms.
There are several thousand objects sparsley scattered throughout the world, most of them are not even moving and not even touching.
enableSleeping: true
is set in parameters in the engine constructor and it doesn't really change anything. There's nothing dramatic happening in the simulation in terms of any events.I tried to set every possible parameter in the constructor to be lower than a default value:Objects are pretty simple. Basically a bunch of circles, occasionally regular polygons. Accuracy is not as important as stability, but with those seemingly arbitrary spikes with 70ms, 90ms, i cannot achieve the thing i need the most.
There's no gravity in the system, its scale is set to 0, so it's like a top-down view.
Computer specs: 32 Gigabytes of RAM DDR3, processor intel core i7-4790, 4-core, 8-threaded, 3.60GHz.
There must be a way to make it faster and smoother. Am i missing some very important setting in matter js?
Details on world contents:
World is the size of 10 000 per 10 000. There are around 5 thousand simple circles mostly not moving. Also there are objects that are essentially several 5 or 6 circles bunched together via simple constraints, but they never exceed the number of 200.
I understand that many objects need more time to process them. I don't expect anything instantenous. But there must be a stable ground. Realistically i cannot afford having an iteration taking more than 50 milliseconds to complete. i need an advice.
The text was updated successfully, but these errors were encountered: