victorfisac / Physac

2D physics header-only library for videogames developed in C using raylib library.
http://www.victorfisac.com/physac
MIT License
432 stars 28 forks source link

cpu usage 100% #29

Closed dzanis closed 7 years ago

dzanis commented 7 years ago

The CPU overloaded,even if few bodies.What can I do? Thank you, for your work! (Linux Mint x64)

dzanis commented 7 years ago

How to added manually update? For example void PhysicUpdate(double delta)

victorfisac commented 7 years ago

Hi @dzanis. I cannot test the CPU overload in Linux platform...

By the other hand, to manually update physics you must calculate deltaTime by your own. To calculate it you need a timer counter to calculate increment of time.

I tried it and update physics calling PhysicsStep() in main thread but dynamics are not applied (even overwriting deltaTime value). But works colliders overlap solutions.