Hacker News new | ask | show | jobs
by chrisjj 849 days ago
I am the only one feeling queasy at a system that treats slow-moving as non-moving?

> ) Sleeping is a technique that reduces the cost of simulating objects that are not moving to improve performance. We can tweak it by adding a SleepingThreshold resource:

fn main() { App::new() .add_plugins(DefaultPlugins) .add_plugins(PhysicsPlugins::default()) // These are the default values .insert_resource(SleepingThreshold { linear: 0.1, angular: 0.2

1 comments

It's a pretty common physics engine optimisation. Yes, it's inaccurate, but the performance gains are often too big to pass up.
It is not an optimisation, note.