- Home /
Switching Between 3 Character Models At Same Location
Hey there Unity devs;
How would you all go about switching between 3 different character models (same model, different color) without moving position and enabling/disabling active and inactive characters as you switch?
The player would press a button, switch to another character model and the original one would need to become disabled. He would need to be able to continually switch as leisure.
The character is animated however it's not a big deal if the model goes to idle then continues with animations when he is swapped.
This of course means I need to make the 2 sub-characters follow the original one perfectly for starters.
Thanks for any help.
Why do you say: "without moving position and enabling/disabling active and inactive characters as you switch?" How are you moving the characters? Can't you just make all three children of an empty game object, put the move code on the empty game object, then show/hide/enable/disable whatever you need? Or if color is the only change between the three models, why have three models? Why not just change the color or material of a single model?
I got a system in place now however I have run into an issue. The 3 models switch and are at the same location for their transform values, but ingame they do not overlap due to their collision boxes. How can I work around this?
You can use Physics.IgnoreCollision(). You would call it between each pair of colliders. Or, if only one is active at a time, you could enable or disable colliders, or you could place each character on a different layer, and setup the collision matrix.
there was a question just like this like 12 hours ago I think. http://answers.unity3d.com/questions/657456/2d-character-switch-systsem-same-location.html#answer-657556
Your answer