• 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 Shigerua · Oct 07, 2013 at 03:32 PM · animationcollisionphysics

Collision with moving door

Hello community,

I have a problem with an animated door. When the door is standing still, I collide with it. When the door is moving, the door ignores the collision and I can walk trough the door. But this problem only exists when the door is moving in my direction, when I collide with the door from the backside, the collision is working.

I tried different colliders, as well as rigidbodys (Animate physics is checked and collision detection is continous dynamic). No of them are working. Would be great if you can give me some ideas.

Thanks!

Comment
Add comment · Show 12
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 ShadoX · Oct 07, 2013 at 08:48 PM 0
Share

I'm not sure if there should be a difference between colliding with the front and back of a collider. Any chance that the center of the object is off? It would also be great if you could share the code that rotates the door.

avatar image meat5000 ♦ · Oct 07, 2013 at 09:01 PM 0
Share

$$anonymous$$ake sure the collider and door are thick enough. Also, moving with transform functions will cause collider teleportation. Consider using AddForce or AddTorque and constrain axes ins$$anonymous$$d. You can change the pivot point but I haven't looked in to that. Or you can use hinges.

avatar image Shigerua · Oct 07, 2013 at 10:39 PM 0
Share

There is no code to share. Its just an animation (exported from Cinema 4D) that rotates a door. And for the character Iam using the default FPS character Controller.

I think the difference colliding from the back is, that the character is moving against the door, while colliding from the front, the door is the moving part.

avatar image ShadoX · Oct 07, 2013 at 11:00 PM 0
Share

Why not try to do it via code?

avatar image Shigerua · Oct 07, 2013 at 11:04 PM 0
Share

Cause in Cinema4D I have complex animation systems and dont need to fight with some scripts

avatar image mattssonon · Oct 08, 2013 at 09:23 AM 0
Share

Have you tried enabling Continous Collision Detection on the RigidBody component?

avatar image Shigerua · Oct 08, 2013 at 09:24 AM 0
Share

Yes I tried it, without success.

Would it help to make a video?

avatar image mattssonon · Oct 08, 2013 at 09:32 AM 0
Share

Just to make sure, have you added a RigidBody to the player?

avatar image Shigerua · Oct 08, 2013 at 09:35 AM 0
Share

No, I just added a Rigidbody to the Door, the player is using the charactercontroller.

I now may see the error... haha

avatar image mattssonon · Oct 08, 2013 at 09:53 AM 0
Share

Did it work?

avatar image Shigerua · Oct 08, 2013 at 09:55 AM 0
Share

Iam currently unable to test, I will test later. Before I have to write a new controller for rigidbody

avatar image Shigerua · Oct 09, 2013 at 01:47 PM 0
Share

Its working fine now thanks.

I made both objects (door and character) a rigidbody. The door is kinematic.

Works perfect!

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

18 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

Related Questions

Collision occurring when it should not! Help! 1 Answer

What is the best practice in handling scenes with 100+ rigidbodies and collisions on iOS? 1 Answer

Is there a way to use physics to keep a character from clipping through itself during an animation? 0 Answers

Help with 2D Hit Detection! 0 Answers

Animate Physics doesn't work 0 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