Moving individual parts of a model using code

Hey everybody,

I would really like to know how one can move separate parts of a 3d model in a playcanvas project. In my car game, i would like to move the wheels individually while the car is in motion, and I would like to turn the wheels when the car turns, but I am unable to. Please help!

Rgds,

Have the wheels as separate models and entities.

You can get access to model’s mesh instances by model.meshInstances

Then just filter your wheels and do magic.

Thanks a lot @mikefinch, I’ll try that

Could you send a snippet of code showing the exact method to do that?