How do I fit a dynamic image texture into my model?

Hello, I am doing my first project in Three js, using it in React.

My application is a system to display skins on some weapons, but I can’t fit these textures dynamically, they get totally out of position.

Do I need to adjust this manually or is there a more “automatic” way to do this?

Here are some screenshots to show you my problem!


Could you share code or a demo? We can’t help much from just the screenshot.

To map textures onto a model, the model will need to have texture coordinates (UVs) appropriate for the texture. three.js uses the 1st UV set for most textures (excluding aoMap and lightMap) if the model has more than one set. Try setting texture.flipY = false if you’re loading a texture separately from the model itself.