- Home /
Maya to Unity Animation using Box Colliders
Hi guys,
Im currently developing a piece of software for use in Kitchen Showrooms. The animation which is keyframed in maya is of opening doors, attached to units via hinges.
Basically, the scene contains the Door, and hinge as the animation is contained in the hinge, and the Door is parented to this.
The Units (empty carcasses) are a separate Maya Document, with no Keyframe Animation.
I understand, that once the Maya file is imported into Unity, the FBX import settings have to be edited to support the Animation which is done. Its simple a case of "open" 0 - 40 and "close" 41-100. The open and close tags are contained within the code.
In a typical scene, a customer will select a Carcase (unit) and then select their desired frontal (door). In some cases, these units contain Drawerboxes. All the content has the same Animation settings, timings and so on. Once the content is placed live, or for that case staging, the frontals and draws should open on 'click'. And, they do. The drawerboxes open on click, and close on click. As for the frontals, they do indeed open however they do not close. Due to the fact that the box colliders are placed onto all objects, for usability we decided that the user is able to click the carcase drawerbox to open and close.
The Units contain Animation import data, as do the frontals. So, the non animated Unit, we have the same animation settings ad the frontal so that our code can track whether the door is open or closed. Its puzzling that drawerboxes animated perfectly, where as the frontals fail to close with the same animation settings from Maya to Unity.
Regards
M D Calver.
It's very hard to say what is wrong from this description. You basically should try experimenting a bit, make sure your settings are correct. $$anonymous$$aybe you could post a couple sample files that illustrate the problem.
Answer by Kacer · Jul 11, 2011 at 01:21 PM
What is your question exactly? :)
Anyway, last time i checked Unity cant export vertex animation, so if you've animated your door in maya by rotating it around its pivot axis, then it wont be imported into Unity.
If you absolutely want to import the animation, you could try to set it up with bones instead.
An alternative could be that you scripted the opening of the door in Unity, by making the door a child of a gameobject, position the gameobject so its where the hinges should be, then script the gameobject to rotate, making it simulate a door opening.
Regards
Kacer
Your answer
Follow this Question
Related Questions
A node in a childnode? 1 Answer
animate only when clicked 3 Answers
Unity Animation Problem 0 Answers
Triggering door animation with collider 2 Answers