Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Question How can I override the default collision response?

Discussion in 'Physics' started by tomlugin100, May 20, 2024.

  1. tomlugin100

    tomlugin100

    Joined:
    May 6, 2023
    Posts:
    97
    Thank you for reading my question!
    I have balls in my game which I wish to have a certain motion upon collision with an obstacle. Both the obstacle and the balls have a Collider and the balls have a Rigidbody 2d. When a ball hits the obstacle, it is sent on a certain trajectory by Unity Physics 2d. How can I give the balls a velocity which I choose upon collision?

    I tried to disable the collisions in the Layer Collision Matrix in Project Settings => Physics 2d, but the collisions are still occurring and I don't understand why

    I appreciate any help
     
    Last edited: May 20, 2024