I have doors that open when you trigger the door, but I want the animation to stop working if the door is barricaded on the other side for example: if I would drag a closet infront of the door i don’t want people on the other side to be able to open the door, but when Someone is on the other side the door goes through the object, so I want the animation to stop midanimation when colliding and go back to its idle state. (this way it won’t cause buggy clipping) if this isn’t possible an alternative would be to have an object bigger than a certain trigger (so a dropped gun won’t work) be put inside the trigger and when its inside the animations don’t work anymore till that object is away from the trigger (ofcourse there should be an exception for players)
What about you make the door with rigidbody and collider, then let the physx to handle the block?
This could be easy, and you can use layer to control what will collide with the door, and what will not.
2 Likes
The problem is the door would bug out so I still would need a script that stops the door animation on collision
You could try playing with the parameters of the HingeJoint, it’s tricky, you could watch the tutorial at the Learn.
If you want to make the door stop at the full-open position, you could put a collider with script at the full-open position, and stop the door when collide with that.