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 /
This question was closed Oct 21, 2013 at 11:36 PM by meat5000 for the following reason:

The question is answered by OP

avatar image
0
Question by zafadadynamic · Oct 21, 2013 at 10:09 PM · animationfbxlocallegacy

Local animation at origin (0, 0, 0)

Of course legacy's going to eventually be phased out so I want to figure this out. I can get this to work in legacy no problem, keep in mind.

I created a rotating heart that I want to animate at a particular location but it keeps moving to (0, 0, 0) when I play it. Here's what I tried:

I created a parent object and attached the prefab to it with no luck.

I created another parent and attached THAT parent object to it, again, with no luck.

I then created a parent object, attached the prefab, then added all of the animations and controller stuff to the parent object. Again, everything just goes to (0, 0, 0).

I also tried grouping models in Max 2013 which didn't work.

I tried linking parent and child objects together in Max which didn't work.

I checked to make sure there were no keyframes recorded in Max for position.

I messed around with every setting possible in the animation tab (Legacy worked, as I said).

And lastly, I even tried edited the location with scripting in LateUpdate.

Everything I found concerning it said to switch to legacy and parent the import. There was one post that said this method is no longer possible. So yeah, I get angry when I can't figure things out so this time I actually got to the point where I needed to ask for help, lol...

Anyway, thanks in advance.

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

  • Sort: 
avatar image
0
Best Answer

Answer by zafadadynamic · Oct 21, 2013 at 10:26 PM

Well, I knew this would happen. This is how it always happens. RIGHT when I ask a question, I fix it. Here's exactly what I did without choosing legacy:

I created this script:

 #pragma strict
 
 var localOrigin : GameObject;
 
 function Start () {
     transform.position = localOrigin.transform.position;
 }
 
 function LateUpdate () {
     transform.position = localOrigin.transform.position;
 }

After I created the script, I created the parent object which included a box collider.

I then added the object I'm animating to the parent object.

Then I added the animation clip by dragging it onto the object I'm animating. Unity prompted me to save a controller, which I did.

The last step was dragging this script onto the animated object and adding the parent gameobject to localOrigin.

When I disable the script, the animated object returns to the origin.

Well, still I have to say thanks lol

If any of you know a way around this for Unity 4, let me know.

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 meat5000 ♦ · Oct 21, 2013 at 10:26 PM 0
Share

Accept your answer :)

Follow this Question

Answers Answers and Comments

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

Related Questions

Animation won't play as Generic but it does as Legacy, I need to use Generic, how can I fix this? 2 Answers

Why Do Legacy Animations Always Snap? 0 Answers

blender to unity animation problem 1 Answer

importing legacy animation fbx with mask 0 Answers

Character Change its Position When Animation Apply on It 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