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 hakermania · Apr 08, 2013 at 05:42 PM · animationpositionblenderdirection

Animation Plays with wrong rotation

I know that this has already been asked multiple times, but I cannot get an answer for this very specific problem I have (at least, this is what I think, comparing it to the other problems).

I've made a model with one animation ("walk"). (both the model and the animation created in blender)

I import my model into Unity and I add an animation component to the model, where I choose my walk animation. I preview it at the animation preview window, and everything seems just fine.

Now, I position my model to its starting position, facing to the direction I want it to, and when I push the forwards button it does the animation correctly, but to the wrong direction (while the character moves forwards (as I've programmed it to do in my script), the animation plays sideways) and also, it begins doing it from the beginning, while the animation loops (the character moves two steps back instantly and replays the animation from there).

Please note the following important points:

  1. At the animation I created in Blender, the position of the model changes (as in a tutorial I followed for blender animation), it doesn't stay static with the whole movement being done in one position.

  2. I have parented my model to an empty object which contains all the needed scripts that control the movement of the character, the Character Controller etc.

  3. When I import the model into Unity, (I know that Ζ=Up for Blender while Z=Forward for Unity) it doesn't have the right rotation, so I rotate it and place it to the initial position. But, once I start the game, it takes the rotation of the animation, even before I move the character so as to let the animation play.

Comment
Add comment · Show 2
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 LyanApps · Apr 09, 2013 at 07:08 PM 0
Share

I think you mean Z = Forward for Unity.

avatar image hakermania · Apr 09, 2013 at 07:11 PM 0
Share

Post updated...! Thanks a lot!

1 Reply

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

Answer by iwaldrop · Apr 10, 2013 at 01:57 AM

You've baked the movement into your animation, it sounds like. When animating, ensure that your model doesn't actually move from the origin, but that his 'legs just slide across the ground'. This is for the exact reason that you're describing. You can't move a mesh through animation anywhere that is to be interactive. An exception might be in a cutscene, and it's generally the case when doing motion-capture. Actors can walk around a scene and be represented during a cut-scene moving around as they did IRL with no problems. It's just when a player wants to control that movement that the animation can't have additional movement baked in, make sense?

So, for each of your animation frames, move your model back to the origin. It's safe to move him vertically a bob effect, but don't translate him on the X/Y (blender) axis.

And, if it wasn't clear, your animation is turning your model to the angle that it was set to in Blender; you probably need to rotate it by the difference.

Good luck!

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.

Follow this Question

Answers Answers and Comments

12 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

Related Questions

Positioned Blender models with animation snap back to 0,0,0 1 Answer

Parts of imported blender object are misplaced (when starting game) 0 Answers

Position of GameObject changes when animating 2 Answers

Blender model shifted on X and Y axis on some part of the animation 2 Answers

Mechanim Won't Move my Avatar Forward 1 Answer


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