Hi,
I am currently using many different characters in my game. Every character should be able to wear helmets. Is there some way to automatically scale the helmet untill the helmet fits on the head?
A scale overlap function, for example.
What method should one use to achieve the result?
The easiest way, it to create a script and to attach it to your “helmet”. The example of a script is lower:
//For example, each character have id
public void myScale(int numCharacter) {
if (numCharacter == 1) {
this.transform.localScale = (0.9f, 0.9f, 0.9f);
} else if (NumCharacter == 2) {
this.transform.localScale = (0.8f, 0.8f, 0.8f);
}
//And etc
}
And call this function how you dress your helmet. I hope that it will help you.