Hi,
I am instantiating three to four objects at a particular position and applying upward force. Problem here is that colliders are getting stuck in each other which I don’t want. Any suggestion on this would be great.
Hi,
I am instantiating three to four objects at a particular position and applying upward force. Problem here is that colliders are getting stuck in each other which I don’t want. Any suggestion on this would be great.
good way to approach this is to first set the colliders as triggers, this will disable all the physics interaction of the colliders but they will still detect which other colliders enter/exit them. then create an integer variable that will count the number calls of OnTriggerEnter and OnTriggerExit. good thing is that OnTriggerEnter and OnTriggerExit are called once for each intruding object and can be called several times during a single FixedUpdate. This will ensure that you will count your interactions correctly. then take your integer variable and increment it in OnTriggerEnter and decrement in OnTriggerExit. once you have the same number of exits as enters (int variable is 0) you can convert your colliders to non-triggers.