Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 Musclegunner · Feb 15, 2011 at 09:17 PM · animationfbx

Autodesk .FBX animation script in Unity

Hi I'm having issues with a model imported from Autodesk. Everything imports correctly and the animations will play ONLY if the 'loop' box is checked in "Animation" in the Inspector. It will play all the animations and then stop them, but I can still move around. I wrote a script to use custom idle and walking animations from autodesk. For some reason I can't get the model to move around the map while playing ANY animations at all. I tried modding the character controller scripts but I am terrible at programming so I'm in kind of over my head. I need the character to move around with a walking animation, stand still with an idle, or attack with an attack, ETC. (you get the point) the game is in alpha so I need to figure out how to do write a script to use these BASIC movements. I am desperate here I've been at this for a week and I can't find anything useful. PLEASE HELP

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

2 Replies

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

Answer by Noah-1 · Feb 15, 2011 at 09:42 PM

Hello.

Well if you dont know a lot of programming I really recommend you picking some tuts or books on the topic to get started.

So if you want to create a script to access animations, this is a relly simple one (just a example that can help you):

var Ranger: GameObject;

if (Ranger.transform.position.x > 2){

Animation.CrossFade ("your walk animation");

}

if (Ranger.transform.position.y > 2){

Animation.CrossFade ("your jump animation")

}

This is a pretty simple code to access your primary animations like jump and walk. First I setted up a variable that holds your model, (be sure to drag and drop it).

Then I told unity if the player moves it will start the walk animation (change it to the name of your animation)

I did the same thing for the jump animation.

I hope this helps, good luck Musclegunner.

Comment
Add comment · Show 2 · 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
avatar image Musclegunner · Feb 15, 2011 at 09:51 PM 0
Share

Awesome thank you very much for the quick responses. The only issue I am running into is... "Assets/CaesiumScripts/Player/BehaviorScript.js(8,15): BCE0020: An instance of type 'UnityEngine.Animation' is required to access non static member 'CrossFade'." I know I'm asking for a mile here but the help is appreciated!

avatar image Dreoh · Apr 09, 2012 at 01:54 AM 0
Share

lower case animation

avatar image
0

Answer by Eric5h5 · Feb 15, 2011 at 09:20 PM

You can't import scripts from other apps; all scripting must be done in Unity.

Comment
Add comment · Show 2 · 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
avatar image Musclegunner · Feb 15, 2011 at 09:23 PM 0
Share

All my scripting has been in Unity :\

avatar image Musclegunner · Feb 15, 2011 at 09:26 PM 0
Share

I meant how can I write a script in Unity for an FBX file imported from Autodesk

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.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

exporting animation FBX child objects animation error 1 Answer

Animation not playing correctly 1 Answer

How to change Default FBX Animations import options 1 Answer

Animated FBX: Model Rest Position 0 Answers

Replace static placeholders with the animated ones 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges