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 Kurpowski86 · Jul 10, 2012 at 06:12 PM · animationgui

Object disappearing after playing animation.

So I'm having a weird issue when I play an animation. I created a simple cube and simple "flipping" animation with it in Maya. I exported it as .FBX. When I bring it in to unity and leave "play automatically" checked, it will disappear off of the screen when I press play. Then it reappears after the game is stopped. I made a GUI with a button to press to make the cube flip, using it's animation. The GUI script is attached to the Main Camera. With the scripts attached I uncheck "Play automatically" and when I press the button, it disappears still.

I've tried animation.Play();, or animation.AddClip();, And I'm coding in C# with this project. Any help would be great thanks!

Comment
Add comment · Show 3
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 nfrrtycmplx · Mar 07, 2013 at 12:03 AM 0
Share

I'm having the same problem, and It's driving me nuts.

avatar image nfrrtycmplx · Mar 07, 2013 at 12:18 AM 0
Share

$$anonymous$$ake sure you have an object in your scene with "Root" in the name and export that with your object.

avatar image nfrrtycmplx · Mar 07, 2013 at 12:24 AM 0
Share

And link all animated objects to it.

6 Replies

· Add your reply
  • Sort: 
avatar image
5

Answer by Baalhug · Sep 18, 2013 at 05:47 AM

The solution to this problem is easy. Look for the object which has the component "Animator". Usually it's the package folder of your mesh/animation. In that component look for a checkbox called "Apply Root Motion". Uncheck it. You're ready to go.

Actually your mesh dont disappear, but it moves to a different coordinate, probably 0,0,0. When you uncheck that option you're telling unity not to use the coordinates the animation already has, and it will use the ones from its mesh.

Comment
Add comment · Show 1 · 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 CoolJWB · May 25, 2016 at 06:26 PM 0
Share

Where is the checkbox? If you can provide the answer please do it because I can't seem to figure it out!

avatar image
0

Answer by lyzard · Jul 10, 2012 at 07:32 PM

it's maybe be related with the pivot point of your object, which moves your object elsewhere when you play, I don't know for Maya, but on blender, I make sure to recenter my object before exporting, can you check that ?

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
avatar image
0

Answer by Kurpowski86 · Jul 10, 2012 at 08:07 PM

Well the pivot point is right at the center of the cube

Comment
Add comment · Show 1 · 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 lyzard · Jul 10, 2012 at 08:17 PM 0
Share

hmm, it could be about the translation of the object when you export, I don't know $$anonymous$$aya at all, but with blender I have to "clear location" before exporting. Check also if your object is not translated anywhere ins$$anonymous$$d of just disappearing, if yes, this can give you a clue. There may be a workaround with parenting : http://forum.unity3d.com/threads/45026-$$anonymous$$esh-With-Animation-Relocates-at-Runtime

avatar image
0

Answer by Kurpowski86 · Jul 10, 2012 at 08:32 PM

Well I just noticed something strange. What happens is that when I press the button, it flips which is great, but.. it rescales it down to like a microscopic size. Because When I brought it into unity I had to rescale it for it to be clearly seen in the editor. But why would it shrink it down to such a small size to play the animation? Is it because in the animation its that size, so when it plays it forces back to its original state?

Comment
Add comment · Show 3 · 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 lyzard · Jul 10, 2012 at 08:38 PM 0
Share

I guess yes, you can try changing the scale when importing (in the inspector) or directly in $$anonymous$$aya. Try to see if that solves the pb. Btw, you should add comments rather than creating new answers for your problem ;)

avatar image Kurpowski86 · Jul 10, 2012 at 08:56 PM 0
Share

When I import it though it doesn't allow me to adjust the scale of the x,y,z, only the scale factor which is set at 1 right now. I changed that to 500 and it did nothing..

avatar image Kurpowski86 · Jul 10, 2012 at 09:09 PM 1
Share

Sorta figured it out, I just changed the scale factor to like 200, and it started to work. I think that it rescales it to its original size of 1,1,1 or whatever it maybe. But when I changed the scale factor it multiplied that I think? So it started looking normal, thankfully.

avatar image
0

Answer by captaincrunch80 · Jul 10, 2012 at 10:06 PM

Try to give it an empty as parent!

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
  • 1
  • 2
  • ›

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

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 5 GUI system 1 Answer

Activating UI panel on GameObject Click/Destroy 0 Answers

create game and watch style frame by frame animation 0 Answers

How do i make a text box appear on screen after a chest has been opened? 3 Answers

Animating GUI Texture - Help 4 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