I have a character that can throw a weapon. The thrown weapon transform is being controlled by the animator even after weapon.transform.SetParent(null).
1) The weapon is initially the child of character's hand. Character has the animator.
2) At a certain timeframe, animation event is triggered to call:
- isKinematic = false
3) The weapon transforms local values remains the same as before dis-parenting (as it is being controlled by animator)
4) Unable to change any weapon transforms when this occur.
- I did not use child-of constraint. Because the thrown weapon should use rigidbody physic
- When this occur during gameplay, disabling the character's animator component could make the weapon move again.
- When this occur during gameplay, dragging around the animation could potentially fix the issue too
- There is no keyframe nor animator on the weapon at all.
I noticed if I rename the weapon name, the issue could be fixed. But is there a better solution?
Customer support service by UserEcho