- Home /
How to access bones of a non uman rig.
I have an object with some bones, how i can modify via C# scripting the position, rotatio, scale of each bones? The rig is not human, so i can't use the mechanim (also i not want to animate the model using animations, i want to dinamicly create the animation via scripting).
Thanks in advance.
Answer by zharik86 · Nov 02, 2014 at 07:10 AM
Main thing, that rig model, i.e. all vectices were attached to bones. Further there is nothing difficult. When you add your object (simply drag fbx) to a scene and you will open object, you will see: SkinnedMeshRenderer and tree of objects with only Transform component. This tree is also your rig and names coincide with names of bones. Further change Transform in the necessary bone and you will see change of position/rotation of parts of model. I hope that it will help you.
I founded my bones, but the question is: why moving it not modify the mesh, cinema4D importer have problmes?
@AironeneroTechnologies I don't know about Cinema4D importer, but better format is fbx. And your object must not have component by name Animation. As you say, you create animation in script. But, in most cases, create only change rotation for bones, and for move use transform main object, which contains ypur tree bones and Skinned$$anonymous$$eshRenderer.
Your answer
Follow this Question
Related Questions
Can I make animations snap to a frame? 1 Answer
How to select an animation clip by index number? 7 Answers
How to call an attack animation that will stop when you stop clicking attack button? 1 Answer
Can the animation editor create local rotational data? 3 Answers
Adding animation clips via script 2 Answers