I’ve created a model of a spinning coin in blender and imported it to unity. If i disable animations (which i don’t want, since it should spin :)) the selected position works perfectly fine. But if i enable animations, the object is resized to it’s initial scale and also the position is resetted.
I’m using both blender’s and unity’s latest version
When you animate the coin in Blender consider setting key frames for rotation, but removing all location and scale key frames. When setting a key frame in Blender press the key frame key “i” and select “Rotation” rather than “LocRot” or “LocRotScale” and you will only key rotation. Conversely you could check Blender’s Graph editor and make sure that all keys relating to location and scale are removed.
Thanks for your reply! That’s exactly what i’ve done
I’ve set a Rotation Keyframe at the beginning, and on Rotation KeyFrame later (frame 36). There’s no Scale / Position keyframe. I’ve also checked this in the graph menu, as i’ve set the transformation to linear.
I’ve also attached the coin as a zip file in the first post. (It’s free to use, if anybody want’s to)
I do have the same problem also with other models i create in blender, even if there’s no rotation. It works fine if i disable animation.
I’ve already found a few threads where people have the same issue, but they’re all “solved” by disabling animation, which is no solution for me, since i want to use animations (not only spinning coins ^^)
Maybe there’s another trick which i haven’t figured out yet… Or is this a bug with the blender importer?
I can’t seem to download your zip, the link just loads up to a blank white page. Parenting to an empty is how I would do it. If you don’t like that solution you could also try creating an armature bone in Blender, use the armature modifier on your coin then create an action that rotates the armature’s pose. Honestly parenting to an empty is probably the easier route.
I’ve only ever used armature animations when exporting from Blender to Unity myself.
I’ve uploaded it to my webspace: www.talantyyr.at/coin.zip
Btw, is this “best practice”?
So if you want to use animations you have either to use empty game objects or create armature’s for simple rotation anims?
If i put about ~100 coins in my level i’d have to create the same amount of empty game objects…
What about animating the coins in unity c# script? I guess this would be kinda inefficient, right? hmhm, i’ll have a look at the armatures…