- Home /
Accessing different parts of a Maya model
I have imported a Maya model in Unity which is not a single mesh. I have separated it into different groups in order to be able to move only some of its parts at any one time.
What I want to know is how do I access in Unity each grouping singularly.
Answer by Owen-Reynolds · Feb 03, 2013 at 03:45 PM
If each part has its own meshRenderer, etc... they count as gameObject children. Can use the standard transform.Find("spigot")
or spigot/filter to find them (from a script on the parent.)
Ok, but with a Transform object as a result how can I get to its rigidbody?
Once you get to the transform, find the RB same as always: transform.Find("leftArm").rigidbody;
If you use it a lot, grab it first: Transform leftHand=transform.Find("chest/lArm/lHand");
then leftHand.rigidbody.AddForce...
.
The path inside Find follows whatever child tree the split up model has.
Your answer
Follow this Question
Related Questions
problem importing animation+mesh maya 1 Answer
Maya LT - Export group as single FBX 0 Answers
Import from maya (fbx or mb) and mesh is rotated? 3 Answers
Maya Model Mesh Collider Problem 0 Answers