• 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 TailKitty · Mar 07, 2017 at 04:21 PM · rigidbodyblendercollision detection

Mismatched collisions between imported .fbx models and other generic objects

There is actually the problem: OnEnterCollision event has been rised not in time then the actual collision happens (at least visually).

I'll explain the way how I'm doing these stuffs, please correct because I'm definitely doing something wrong (don't have any successful background behind with this).

  1. Creating rigid model in Blender (all meshes are parented to the armature it is connected to).

  2. Parenting the armature by itself to the empty object (to prevent strangle angles effects in Unity after importing the model)

  3. Deleting everything from blender scene (lightnings, camera .. ) except armature and it's child.

  4. Exporting model as .fbx scaled as 0.01 (to make it's more close to desired size in Unity by setting scale to 1)

  5. Dragging the resulted .fbx into my Unity models asset folder.

  6. My model is now getting structure like this:

\ MyModel (Empty Object) \\ Mesh objects (with Transform component only) \\\ Meshes itself (often separated into pieces for models which were imported into Blender as .stl which by itself were pre converted from .STEP format before). \\ Armature \\\ All bones parented one to the previous one + 1 additional end bone at the end

  1. Dragging the resulted MyModel (prefab) to Unity scene.

  2. Attaching box collider and rigidbody components to the bone which mesh I'm going to collide with (Doing this regarding the bone because the mesh object by itself not following it's meshes and appropriate bones ...).

  3. Create another object on Unity scene also with box collider and rigid body on it, setting its tag to "MyTag"

  4. Attaching script to the bone similar to this one:

    void OnCollisionEnter(Collision collision) { if(collision.gameObject.tag == "MyTag") { //Do stufff } }

  5. in the same script I'm tweaking it's localRotation for bone in Update to smoothly go closer to the "MyTag" object

  6. Other bone localRotations are also tweaked by its own scripts attached to each of these bones

  7. Starting the Scene

  8. Observing both box colliders on scene and see that the collision enter event rises a little bit earlier than the actual collision is happen ( feel like there is something else invisible else between these two box colliders which triggers the collision earlier).

  9. Okay.. dirty but pushing a collider on bone to the opposite side from the object it should collide with for this invisible amount of space.

  10. Result: awful feeling that this strange thing is happening + if the whole scene will be scaled this invisible gap will become bigger and smaller in the opposite way for scaling (the bigger gap for smaller scalling).

I'll very appreciate any improvement in my dirty way of doing described things and of course i would like to know what is happening with these collisions and how to handle this in a proper way.

Got a pluralsight access so if anyone know a handy course for the things I described and doing wrong, you may also offer it to me.

Please try to help me to sort out with these stuff here.

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

0 Replies

· Add your reply
  • Sort: 

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Always Get Same Physics Collision Rebound Force 1 Answer

Player with RB + capsule collider can easily penetrate ALL kinds of primitive colliders. What do I do to fix this? 2 Answers

Player going through curved walls imported from blender 1 Answer

OnTriggerEnter not called on rigidbody? 2 Answers

Bug in collision detection? 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