title: OnTriggerEnter2D and OnTriggerExit2D called mutiples time
body: <p>I have one Player with <code>RigidBody2D</code> and a pillar with <code>BoxCollider2D</code>.</p>
  
  <p>I check when <code>OnTriggerEnter2D</code> is called ( Player collided with the pillar ) then I try to keep Player position by change his <code>bodyType</code> to <code>Static</code>. </p>
  
  <p>When <code>OnTriggerExit2D</code> is called, Player <code>bodyType</code> will be reverted to <code>Dynamic</code> again.</p>
  
  <p>My problem is: after change player <code>bodyType</code> to <code>Static</code> , <code>OnTriggerExit2D</code> is called immediately. And after reverted to <code>Dynamic</code>, then <code>OnTriggerEnter2D</code> is called immediately. It goes on repeating again and again. </p>
  
  <p>This is my Player and pillar </p>
  
  <p><a href="https://i.stack.imgur.com/7IJmY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7IJmY.png" alt="enter image description here"></a></p>
  
  <p>If you have any suggest please tell me.</p>
  
  <p>Thank you.</p>