Can I manipulate mesh components of imported fbx file?

Hi everybody. Is it possible to have a full control over mesh elements of an imported fbx model? Here is the example test project. As you can see there are several mesh instances in this car model. I can easily change their material and manipulate their texture and color. But what about other values like position, rotation etc? I don’t see any editing option to affect these. Is there any way to achieve this?

You mean those in the right panel? Position, rotation, scale?

You can, but only in code.
For example:

var modelPart7 = this.entity.model.model.meshInstances[7].node;
modelPart7.setLocalPosition (1, 2, 3);
modelPart7.setLocalRotation (0, 90, 0);
2 Likes

Yes, those in the right panel. But position, rotation and scale I can see only for the whole car. I would like to move specific parts like tires, door, windows etc. These meshes if I’m correct are called mesh instances. See below. As far I can see I can only manipulate their material.

underlight thanks for the answer. Would it be possible to have a control over these mesh instances from the editor? Maybe export fbx files in some special way?

As far as I know, it’s not possible at the moment.
If you want to setup specific parts of your model, you can do that only via code, that’s what current workflow is.

1 Like

I see. thanks for the feedback!

This is something we have talked about many times and we are thinking of implementing it at some point but I can’t give you an ETA yet… Until then the only way is doing it in code :wink:

That is good news indeed. One more reason to stick with Playcanvas :grinning: I’ve set my account here while ago but only recently I started really using it. It’s been only a couple of days and I’m already a huge fan :grin:

1 Like

As mentioned if you import the model as a single FBX then you can’t access individual mesh instances separately in the Editor.

You could split the model into separate FBX files and import them individually. This would give you a separate model for each part, and you would be able to position them. And of course you can share texture, materials between models so it is a similar outcome.