x


How to control animated bones of an FBX file?

Hi, I was wondering what the proper workflow is for accessing bones of an animated hierarchy saved as an fbx.

I have an animated tower, every object has a key on every frame. In code I aim the towers gun at a target. this however does not work properly since the animation that is played on the tower overrides what i do in code. My part solution was to add an extra controller object in unity into the hierarchy which has the gun as a child. now i have controll back over the orientation of the gun, however the animation is "lost" or disconnected.

The animation window even tells me that the curves are "Leftover" however i dont know how to relink them to the apropriet bone.

Is there a way to avoid said problem? Is it possible to export an fbx that only has certain curves of an object animated while the others are blank, or do i need to delete some curves, is that even possible with a read only fbx?

The animation of the tower is split on import, if that changes anything.

more ▼

asked Jul 17 '12 at 10:07 PM

pheash gravatar image

pheash
352 1 5 9

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

The usual approach:

  • Play animation on the tower just as any animation
  • Make adjustments to the orientation of the turret in LateUpdate (not in Update), because it happens after sampling animation and this way you can override transform values.
more ▼

answered Jul 18 '12 at 09:49 AM

Paulius Liekis gravatar image

Paulius Liekis
7.3k 16 24 46

sorry for the late reply and thanks for the reply. this sounds like the solution i was looking for!

Jul 19 '12 at 08:42 PM pheash
(comments are locked)
10|3000 characters needed characters left

The general advise is, do not animate the root bone. If you do this, you have to make the "whole" model a child of another object. Don't break up the bone hierarchy. Another way is to set a mixing tranform to effectively ignoring some curves. Another way is to remove the animation curves in your modelling application, or create duplicates of the animations in Unity (CTRL + D), replace the animations in the animation component and edit the animation in Unity.

more ▼

answered Jul 18 '12 at 10:29 AM

Bunny83 gravatar image

Bunny83
45.5k 11 49 207

hey, sorry for the late reply, this sounds a bit over complicated for my scene. I will look into mixing transform though it sounds interesting. thanks

Jul 19 '12 at 09:06 PM pheash
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3807
x561
x24
x1

asked: Jul 17 '12 at 10:07 PM

Seen: 637 times

Last Updated: Jul 19 '12 at 09:06 PM