• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Andreas Hagen · Feb 07, 2011 at 08:59 PM · animationfbxplayidle

Use Animations from fbx files?

I imported an fbx files with I have animated with Cinema 4D and wanted to play them with

animation.Play("Walk");

but nothing happens. It's completly ignored. I have two animations, the first named "idle" and the second called "Walk". What have I done wrong?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by reissgrant · Feb 08, 2011 at 12:26 AM

Make sure the keyframes are set in your FBX import file. In the import dialog, check "Split Animations" and set the keyframes to the beginning and end in accordance with your C4D file.

Or, you can do it with script:

function Start(){

animation.AddClip(animation.clip, "Walk", 0, 48, false);

animation.playAutomatically = false;

animation.wrapMode = WrapMode.Loop;

}

function Update () {

if (Input.GetKeyUp ("1")) {

 animation.Play("Walk");     

}

}

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

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

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Why can't I get animations to play? 1 Answer

can't get fbx animation to play 2 Answers

Idle Animation fighting/overriding other ground animations 0 Answers

FBX Animation to Sprite 0 Answers

Why does Parented FBX keep transforming to 0,0,0 when i press play? 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges