- Home /
Rotate Bone ?
Hi...
I use a FBX character for my game ... what I want when the player run I want to rotate his chest by moving the mouse ... the problem when the FBX animation play I can't use the rotation.
I just wanna rotate one bone ... how can I do it ?
Answer by coffiarts · Mar 22, 2013 at 07:50 PM
This sounds exactly like the problem described (and solved, hopefully) here:
How to combine mecanim and script based bone movement/animations?
How to rotate a bone during an animation?
Let me know if this helps!
Thank you for answering my question ...
I tried the code but the problem when the bone rotate the character will stop playing the animation ...
I want him to rotate without stop it ...
Then it means that you need to find a way to mix the running animation with a rotating animation.
I've never done this, it's only theory!
In my imagination, you'd have to create an animation that handles only the rotation of your bone (from left to right and vice versa). Then use mouse input to deter$$anonymous$$e which state/frame of the animation needs to be played during each frame (I don't know whether it might be possible to do this with Animation.Sample()?).
Finally, you need to mix blend both animations, either by using Animation.Blend(), or by moving your rotating animation to a separate layer in mecanim.
$$anonymous$$ight be complete rubbish, but it might also work! :)
it's work thank sooooooooooooo much , I did a mistake first time after a corrected work fine ... 100000000000000000 Thanks
You're welcome. I had to struggle myself so long with this problem that I am glad to help.
Your answer
![](https://koobas.hobune.stream/wayback/20220613094910im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Rigged Model Distorted when Imported to Unity 0 Answers
Problem to export biped model with extra bones 1 Answer
Discrepancy in animations between Blender and Unity. 3 Answers
Cinema 4D to Unity 3 Bone Problem 0 Answers
bones is causing flip mesh? 3 Answers