- Home /
When I Disable/Change the speed of my 3d Characters animation, my animation that i created in blender stops working?!
When I Disable/Change the speed of my 3d Characters animation, my animation that i created in blender stops working, it makes my character change angle and some of the bones to stop moving at all i've tried resetting my characters position before changing the speed back to 1 and i still encounter the problem. I've tried using the blend tree to change to a another motion (which is a freeze frame of his initial position) and back to the other animation when i want to use it and it still occurs. For a better reference i have a boxer hitting a punching back on loop in the background of my scene when i go into one of the menus i want him to stop and have done successfully however when i back into the main menu he starts hitting the punching bag again but looks stupid and nothing like he did initially.
I can provide screenshots if needed (I am new to unity so have probably overlooked something simple) PLEASE help :(
code below....
private void Awake()
{
// startPosition = transform.position;
//startRotation = transform.rotation;
}
void Start()
{
animator = GetComponent<Animator>();
}
// Update is called once per frame
void Update()
{
if (Pause == true)
{
//animator.speed = 0;
//player.SetActive(false);
animator.SetFloat("Bag", 8);
animator.speed = 1;
}
else
{
if(Pause == false)
{
animator.SetFloat("Bag", 0);
animator.speed = 1;
}
}
}
found the problem it has something to do with applying root motion when in playmode if i toggle apply root motion on and off my gameobjects root motion starts working again until i pause it again and i have to rest the process i've tried toggling it on and off in the update() method but this does not work please help i've even tried just toggling it on in the update() $$anonymous$$ethod and it still doesn't work unless i manually toggle it off and back on in the hierarchy PLEASE HELP :(