Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Question Manipulating collision behavior while collision starts happening

Discussion in 'Physics' started by artyomich365, May 24, 2023.

  1. artyomich365

    artyomich365

    Joined:
    Apr 27, 2019
    Posts:
    1
    Hello, i searched a lot and decided to write question myself. In my game i want to make bullets pass through if some critical chance happened and stop if not.

    For now im using OnCollitionEnter2D in my bullet to call event that makes another object to do some business logic(for example take critical chance odd, deal damage to target) and delete bullet.

    So for me it would be cool to have an ability to detect collision, make callback to my another object and decide to pass my object through(maybe ignore collision) or stop/delete.