• 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

Show more comments

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



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

Help with 2D Hit Detection! 0 Answers

Getting collisions when using an animation to move an object? 2 Answers

Physics based combat reactions merged with animations? 0 Answers

Continuing movement after animaton on GetButtonUp 0 Answers

how could a player (or an object) be moved onto and inside an animated vehicle? 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges