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 Porto881 · Sep 28, 2013 at 12:42 AM · animationblenderzero

Blender animations moves my object

I just started working with Blender and i just made a cube with a animation, it just moves back and forth in one axis basicly. The problem is when i export it to Unity and place it where I want it and add a animation controller to it with my animation the cube moves to Unitys 0, 0, 0 world position. How do I make my animation play wherever i place my object?

On all the tutorials I have watched to try to get an answer to this the person who made the video always puts the object at unitys 0 position but of course you should be able to place it at your desired location?

When i add sample characters that I have downloaded to my scene they animate great and stay at the same position as i put them.

Also: When i scale the object in unity and then hit play the object goes back to its "natural" size.

What is wrong? Something in the export from blender that mess things up?

I use the latest versions of both programs.

Comment
Add comment · Show 6
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 RyanZimmerman87 · Sep 28, 2013 at 12:10 AM 0
Share

Did you try setting the animation mode to Legacy when you select the .fbx. Did you place the object into the scene when you are not in play mode, or move it to the desired location when not in play mode?

It sounds like you are making some kind of simple mistake like that.

avatar image Porto881 · Sep 28, 2013 at 12:33 AM 0
Share

When I changed it to Legacy it works actually. The problem is that i only works when it has a parent object? I tried to export only the selected object from blender and then i get a .fbx in unity with the cube and its animation. The problem is that now it doesnt help that i changed it to Legacy, it jumps to 0 and sinks halfway through the plane...

When i export the whole thing from blender including the camera and lamp it works... Without the lamp and camera it doesnt work... Weird...

PS. I do all these things in scene-mode.

avatar image RyanZimmerman87 · Sep 28, 2013 at 12:39 AM 0
Share

O$$anonymous$$ what I mean is that you didn't press the Play arrow button in Unity to start the scene when you try to move it? If you do that none of the move changes will stay. You need to make sure you do all your Unity adjustments in the Editor while the game is not running.

It sounds like you exported the .fbx wrong in Blender and have your cube somehow a child object of the lamp and camera?

In the Export settings there are several boxes highlighted blue in my version of Blender.

Empty, Camera, Lamp, Armature, $$anonymous$$esh.

You want to deselect the ones you don't want to export. Usually the only ones I leave selected are Armature (if it has bones for animations) and $$anonymous$$esh (so you can see it).

I also deselect "Include Default Take" since generally that will just give you a useless animation in most the .fbx I've dealt with.

Also why are you importing a cube as an .fbx you know you can make a cube much easier inside Unity right? And why are you animating a cube?

I'm just kind of confused what you are doing unless this is a test to make real character .fbx models in future?

avatar image Porto881 · Sep 28, 2013 at 01:11 AM 0
Share

Nope I do everything in the editor mode, nothing is done while in play-mode.

I´ll try to explain a little better, English is not my first language so it might get confusing :)

First of all, I just made a cube with a simple animation of it going back and forth just t try how it works basicly. $$anonymous$$ind of like a first step to making more complicated models and animations. When i export as .fbx with Empty, Camera, Lamp, Armature, $$anonymous$$esh selected i get those thing in the fbx in Unity. When i drag that fbx into my scene the Hierarchy looks like this:

TestCube

Camera

Cube

Lamp

When i change this fbx to legacy the animation works and the object doesnt go to 0, 0, 0. But when i export only the mesh and the included animation it looks like this in the Hierarchy:

TestCube

and when i press play the cube moves to 0, 0, 0. Even tho I changd it to Legacy.

I hope you get what i mean.

avatar image RyanZimmerman87 · Sep 28, 2013 at 04:20 AM 0
Share

Did you try to export the .fbx with only armature and mesh selected? You don't need the Empty, Lamp, Camera in your .fbx export. That is likely your problem.

Show more comments

4 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by zanearn · Nov 12, 2013 at 02:41 PM

Make a empty GameObject 'G'. Move the cube under G as its child. Move G to the place you want the cube to be. Test the animation again.

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 relicright · Nov 20, 2013 at 08:06 PM

Revert to Blender 2.5 or before, this will fix the resetting of the objects position while playing animation until they fix the bug.

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 meat5000 · Nov 20, 2013 at 08:11 PM

This is not a Blender Issue.

You can animate 'in-place' or move root within your animation in Blender.

In Unity Legacy animation supports 'in place'. Use a root-motion animation with legacy and the object will snap back at the end.

Using Mecanim root-motion will work correctly, or you can bake positions in the model import animation tab if you want a root-motion animation to not move the root.

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 relicright · Nov 27, 2013 at 05:31 PM 0
Share

This is actually a blender Issue. The second i reverted to Blender 2.5 all of my animations needed no extra tweaking after they were imported. I find this much less of a hassle than going through unity fixing every animation you import. I know you can do it through unity, but it's about working smart not hard.

avatar image
0

Answer by ToddToddTodd · Sep 04, 2014 at 07:53 AM

I had trouble with using animated objects made with Blender. Not rigged character animations, but objects with location and rotation animated. The object was misplaced during play no matter where I positioned it with play off. I know the Mecanim can animate it as meat5000 talks about(I've used that before but would need a refresher). I want to have a thorough understanding of how things work in Unity. Eventually you want to know it well or else you a lot more mysterious problems like this one.

However for a short term solution I have found that parenting the object ( as zanearn says above) or animating it in Blender with a rig can fix the problem.

I had trouble when I tried to make a prefab from an empty and instantiate it. When I did, there was something wrong. A script node didn’t remember what was assigned to it or something.(can't remember for sure). However, I got it to work by making a sort of false empty.

Here's what I did.

  1. Create a primitive object such as a cube in the hierarchy.

  2. Then turn off or remove the collider and mesh renderer for the primitive. Now you have an object that can work as an empty but is not really an empty.

  3. Parent your imported object to the primitive.

  4. Then you can bring the primitive back to the project window to make it a prefab.

I don't know if I needed to do this, but I was having trouble otherwise.

Second Method .Another solution is to rig and animate the object in Blender rather than using simple location and rotation animations. (This won’t work for simulations of course. )

Steps: 1. Create one armature bone in Blender and parent the object to it. All vertices will attach to the single bone, so you won’t get any deformations. 2. The location and rotation of the object can then be changed by animating the location and rotation of the bone in “pose mode” just as you would with a character rig.

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

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

Related Questions

Blender Animation Looping Delay Problem 2 Answers

How to make natural character animations? 1 Answer

Exporting a Bezier cirlce from blender to unity 1 Answer

Blender Animation Problems 3 Answers

split animations problems 2 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