Sync physics With Display Models

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
Posts: 11
Joined: Mon Aug 05, 2019 12:06 pm

Sync physics With Display Models

Post by SugarGlider » Thu Aug 15, 2019 5:12 am

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.

Site Admin
Posts: 4913
Joined: Tue Jul 04, 2006 4:45 am

Re: Sync physics With Display Models

Post by Norbo » Thu Aug 15, 2019 6:57 pm

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.

Post Reply