I doing in maya... some different prepared cut. I want to sword animation When it touches the enemy. cutting (prepared cut) automatically work. example( A ) attack 90 degrees touch sword... enemy body (90 degress prepared cutting) automatically active.(work) (B) attack 60 degrees sword touch body( prepared cutting) active... this like Fake cutting.
You would have to set up the object like a button to enable the object to react to a key press. Eg whe you press the left mouse button to attack. Then you need to right up a script that would enable all sub objects under the prefab to enable a preset up rigged body so that it can rol around n stuff. easier said then done.
There is no way of doing this unless you animate the object braking in maya and then Inport the animation with object in to unity. You need to then set up the animation so it plays in unity then add a trigger to the object and the. You will need to write a script that will play the animation when a button is pressed when Looking at the object.
you could maybe do it in code with a Mesh Filter and Mesh Renderer using hit.collider with this you can effectively swap out the mesh so when the object is hit by the sword you would destroy the old and filter in the new and possibly use physics for the break animation. or have it play a break animation from Maya when the new mesh is loaded
keep it simple:
-Create slice animation variations in maya
-export as separate .fbx's
-when sword collider enters barrel collider, check angle variable, swap with corresponding .fbx and play animation
no physics in this method, but it would be quick and relatively cheap performance wise
I creating object and slice in maya. already I cutting object in maya. ready for to disperse, ready to fall. One object but two pieces or more part for other sword attack angles. 90 degrees animation touch object. result : object 90 degrees cutting. thats it...
Why cutting animation ? gravity ? cutting part automatically down.
Sorry that last post is a bit unclear. From what i gathered you're wondering how to create the actual animation?
if this is the case then you could either keyframe it by hand (something this simple would be easy to do) or simulate the slicing using dynamics then bake the simulation to keyframes.
Does not look reasonable for me cause this way of cutting will limit positions from which sword animation matches cutting line.. If you pre-cut you just need to align your character to correct position at start of slice.
Replies
I doing in maya... some different prepared cut. I want to sword animation When it touches the enemy. cutting (prepared cut) automatically work. example( A ) attack 90 degrees touch sword... enemy body (90 degress prepared cutting) automatically active.(work) (B) attack 60 degrees sword touch body( prepared cutting) active... this like Fake cutting.
anyway .. thank you very much
There is no way of doing this unless you animate the object braking in maya and then Inport the animation with object in to unity. You need to then set up the animation so it plays in unity then add a trigger to the object and the. You will need to write a script that will play the animation when a button is pressed when Looking at the object.
-Create slice animation variations in maya
-export as separate .fbx's
-when sword collider enters barrel collider, check angle variable, swap with corresponding .fbx and play animation
no physics in this method, but it would be quick and relatively cheap performance wise
I creating object and slice in maya. already I cutting object in maya. ready for to disperse, ready to fall. One object but two pieces or more part for other sword attack angles. 90 degrees animation touch object. result : object 90 degrees cutting. thats it...
Why cutting animation ? gravity ? cutting part automatically down.
if this is the case then you could either keyframe it by hand (something this simple would be easy to do) or simulate the slicing using dynamics then bake the simulation to keyframes.
Sword touch area.. maybe like this box or... not box (direct : 3d models, monster vs.) sword attack : Red (X) green (Y) yellow (Z)