Page 1 of 1

Sync physics With Display Models

Posted: Thu Aug 15, 2019 5:12 am
by SugarGlider
Hello
I have been looking through the demos and forums for an example of how to get a list of objects that have moved during the timestep so I can update their visual mesh couterparts. Could you point me in the right direction? The demo code is complicated and not well commented and I'm finding the learning curve quite steep :oops: . The demos render the physics shapes directly so I can't find an example that would help me here.
Thanks

Re: Sync physics With Display Models

Posted: Thu Aug 15, 2019 6:57 pm
by Norbo
The demos just use a super simple brute force 'start from scratch, add every single object in existence, every single frame' approach.

The Simulation.Bodies.ActiveSet (which aliases Simulation.Bodies.Sets[0]) contains all bodies which are currently awake, which is a decent proxy for moving objects.