Tag Info

Hot answers tagged


clankTime(t, A, B) { float cT = 1.0-A; float t1 = cT+0.5*(1.0-B)*(1.0-cT); float t2 = cT+0.5*(1.0+B)*(1.0-cT); if (t > t1) { float m = (1.0-t2)/(1.0-t1); return m*(t-t1)+t2; } else if (t > cT) { float m = (t2-cT)/(t1-cT); return m*(t-cT)+cT; } return t; } Where A is the duration of the ...


Use a trigger within the Animator instead of a boolean. Remove the AnimationEvent from the animation and the stopFighting function you created. Then, once you've changed the parameter type in the Animator you can change the code to: Animator.SetTrigger("IsFighting"); Then once it triggers it will turn itself off after the animation state evaluates it.

Only top voted, non community-wiki answers of a minimum length are eligible