Reputation: 11319
The door is in lock state when it's red. If I push the character forward nonstop on the W key in the middle of the door part it will not go through. But if I will push it forward nonstop on one of the red parts(The ShieldFX) of the door it will then go through the door. If I push it on the red part/s once it will not go through but when pushing pressing the W key nonstop after few seconds(1-2 seconds) it's moving through the door.
This is a screenshot of the door and this is a child that have a collider on it and also Door_Left and Door_Right have colliders also box colliders and on both the box collider trigger is off unchecked.
This is a screenshot of the red part. It's a shield, Not my shield : DoorShieldFXLocked and DoorShieldFXLocked (1)
Upvotes: 0
Views: 74
Reputation: 149
You could try to
- Make the collider of the rigidbody a bit larger
- Make the physics time step smaller. What you are optimizing for us making sure that in one physics step you never move more than the entire size of the collider.
- Make sure the rigidbody doesn't exceed a certain speed at which you know, it can't tunnel. You can use drag for this purpose.
Taken from @Joachim_Ante in collision detection at high speed
Upvotes: 3