- Home /
character model squeezes in moving platform.
I have managed to create a moving platform with my character becoming it's child, which results the character moving with it. Quiet a good solution. However, This leads to a problem which makes my character model F'up. Actually, my player model get's slim his capsule collider get's stretched out and the model gets slimed, like he is packed. I have looked at other ways to add moving platform but i couldn't understand them. This one is very simple. Here is the script i use. Please help me THank you.
function OnTriggerEnter (other : Collider) { other.transform.parent = gameObject.transform; } function OnTriggerExit (other : Collider) { other.transform.parent = null; }
Answer by IronFurball · Nov 10, 2012 at 10:56 PM
I think the reason your character is changing its shape is because the scale of the platform he is standing on, isn't 1,1,1.
so when you make the platform his parent, your character changes his scale to fit the scale of the object he is parented to.
yes you are right and yh it did change scale so what is the solution to it ?
Answer by munaeem · Nov 15, 2012 at 08:18 PM
I have solved it. I had to Create an empty object and adding the Unity animation or any animation to it. Then add child to this empty object and those child are the model and the trigger.
In the Hierarcy it looks like this
> EmptObject (name it anything you want)
The model (which is moving)
The tigger (which has the code)
So the model & the trigger are the children's on the empty object not each other. Any questions ask
Your answer
Follow this Question
Related Questions
How do people make an efficient FPS animation/modelling system? 0 Answers
How do I allow character model body parts to be controlled? 0 Answers
What is deforming my character? 1 Answer
Character animation modeling 2 Answers
Character Animation Help 0 Answers