- Home /
Swapping out character skins using javascript?
Hello,
I'm making a game where my character can swap different "forms" and have unique abilities in each form. However, I'm having trouble being able to change forms on the fly. What I mean is I want to press a button to shift forms and this would simply change my character's material (ex. change from fire to water form). I have different prefabs for each form, so would I just delete the current transform and instantiate a new one in the same position whenever I want to swap? I feel this may lead to complications as the enemies are "linked" and have my main character controller targeted from the beginning...so I'm just wondering if there's an easier way to do this or if I'm on the right track...
I don't see how this is a duplicate of question 1490. Reporting duplicates should only be used for reporting almost exact duplicates, not just because the questions are somewhat related.
Answer by ckfinite · Oct 16, 2010 at 02:15 AM
You could add a empty gameobject as the player, have the form prefab be a child to it, and switch them out. This would keep the enemies targeting, and the form could change.
Your answer
Follow this Question
Related Questions
How can i make my scene restart once my character has collided with another object? 2 Answers
can you make an entire 3d character only by scripting? 3 Answers
Amnesia style 1 Answer
JS to C# List type problem 1 Answer
A lot of objects in 1 scene 0 Answers