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
1
Question by Schneider21 · Jan 04, 2015 at 09:06 PM · animationcollisionblendermesh-collider

How to animate level mesh with collider?

I've created a model in Blender that contains a single object with an Armature associated. The Armature contains separate bones for each loose collection of vertices in my object, with vertex groups assigned to each bone. I then created an animation of panels opening and a ramp extending.

alt text

I've been importing my .blend files into Unity and generating mesh colliders for the basic level geometry. My understanding is that Unity drops the mesh collider generation when animations are imported because you can't animate a mesh collider. I can settle for using primitive colliders, but I'm kind of clueless as to where to go from here.

  1. How would I go about animating the ramp with associated primitive mesh colliders? Any good resources for Unity level (not character) animation?

  2. Should I not be animating the model within Blender if I can be doing it in Unity? Is it easier to just handle everything within the same system?

  3. If I'm going to stick with Blender for animating, I'm not really clear on how to set up multiple animations (with proper naming). Also, is it 'correct' to keep things the way I have it, as one object, or should it be broken up as one object per separate piece?

ramp.gif (451.7 kB)
Comment
Add comment · Show 1
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 Schneider21 · Jan 06, 2015 at 07:11 PM 0
Share

I did find this tutorial that covers animating levels with $$anonymous$$ecanim, but their door covered only a simple box collider, not a complex collider situation like I have. And it does seem like it'd be easier to build the animation in Blender and import that in, then use the Animation States to manage them.

I've noticed I can apply colliders to the individual parts within my model, but the ramp in particular gets pretty wonky. A box collider added to the ramp part itself gets rotated around in a crazy fashion and is impossible to line up with the actual ramp section. I'm assu$$anonymous$$g this has something to do with the rotation angles Blender used. The items that didn't rotate don't seem to have this issue.

I'll probably try refining the animation within Blender, and try the approach of multiple box colliders applied to the animations, and try using $$anonymous$$ecanim to move everything around. Any advice is still welcome, but I'll update this thread if I can resolve it myself.

1 Reply

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

Answer by Schneider21 · Jan 07, 2015 at 03:19 AM

Well, I believe I've figured it out.

I decided to go with Mecanim after all, and not import animations from Blender. I did leave the Armature in place, but applied no animations to it prior to importing.

I created 4 animation states within an animation controller: Ramp Open, Ramp Closed, Opening, and Closing. Each corresponded to an animation loop (two of which were just single frames of the open/closed position). I then set up logic to transition between the states depending on a boolean value (triggered) or through completion of the opening/closing state.

As I anticipated, adding the box colliders was much easier once I imported the model with each bone at nice, flat angles. So the ramp, which previously was imported at the open state, was imported at the closed state where it's flat. The collider, when applied to that particular piece of the armature, would then follow along with the object throughout its animation phases.

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

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

Related Questions

Collision for Animating Meshes 1 Answer

Creation of a door with collision for a FirstPerson game 0 Answers

Blender Path animation to Unity? 2 Answers

Color animation 1 Answer

How to call a function on animation frame when the animations are animated in blender? 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