Mesh separation from havok shape, latest version


I recently updated my packages, and I’ve encountered an issue with havok. When setting the motion type of a mesh to static, and then changing it (with a timeout) to dynamic, havok will make make the change to the physics shape of the object, however, the visible mesh will not be updated.

This was working fine when using “@babylonjs/core”: “^6.39.0”.

Here a screenshot and the PG:

Cc @Cedric

When creating a body as static, its physics->mesh sync update is disabled for obvious performance reason.
you have to set it back if motion type change

This is something I will make automatic in the future.


This solves it, thank you!

Ah, I also noticed this happens on animated bodies, even when they were initialized as animated and never changed. Do we need to call “disablesync = false” (line 59) every time? This wasn’t the process on previous versions, or is this a bug?


animated bodies are animated ouside the physics. So, as their motion is controlled by the user, no need to update the meshes from the physics.
Anyways, you can always force the setting :slight_smile:

1 Like

Thank you!