How to animate GLTF model in cesiumJS and solving back-face culling issues

Hello, I am new to CesiumJS and have a GLTF model that I need to animate within the scene. I’ve added it to the scene using Cesium.Entity and made it move using SampledPositionProperty. However, I’ve encountered an issue with back-face culling. If I use Model.fromGltfAsync to load the model and set backFaceCulling: false, it solves the problem, but the position of the model added this way is set through modelMatrix. How can I make it move in a way similar to SampledPositionProperty? Or is there a way to solve the back-face culling issue with models added using the Entity method?

Hi there,

Using a PositionProperty with the Model rather than Entity API is totally possible, though a little more verbose.

You can use the SampledPositionProperty.getValue function to evaluate the current position, then use that value to update the model’s modelMatrix property. Here’s an example.

Hope that helps,
Gabby