Cannon-es-debugger in the next position before mesh

Using CannonDebugger (cannon-es-debugger):

I was wondering if it’s normal to have the physic body rendered in the next mesh position. Like this box going down at high velocity.

Are you triggering the physics simulation before or after rendering? The same goes for assigning the positions.

2 Likes

Amazing! :astonished:

I was updating the debugger after setting the word step, but updating before resolves this bug

  • before
world.fixedStep() // Update cannon-es physics
cannonDebugger.update() // Update the CannonDebugger meshes
  • after
cannonDebugger.update() // Update the CannonDebugger meshes
world.fixedStep() // Update cannon-es physics

Not like in the cannon-es-debugger readme, but it works: GitHub - pmndrs/cannon-es-debugger: Wireframe debugger for use with cannon-es https://github.com/react-spring/cannon-es

Thanks! :slightly_smiling_face:

2 Likes