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. Dismiss Notice

Resolved how I can disable slow down ball movement with physics material 2d, and keep ball rotation

Discussion in 'Physics' started by pareylook, May 28, 2020.

  1. pareylook

    pareylook

    Joined:
    Mar 4, 2016
    Posts:
    10
    Hi guys, I'm trying to make block breaker game. And I have a problem with a ball. I use Physics 2D and I have Physics material 2d on my ball. But when I use it, my ball slow down after several bounces. I tried to fix and set up a friction parameter in physics material equals zero. It works, but my ball stopped spinning after bounces. How I can disable slow down ball movement, and keep ball rotation.
     
  2. Monique_Dumont

    Monique_Dumont

    Joined:
    Feb 18, 2020
    Posts:
    41
    Hello,

    I don't think you need physics or even the rotation for your game. What I would do is calculate what will be the new direction of the ball depending on the angle of the trajectory. As for your ball rotation, if it has no effects on gameplay I would just rotate the sprite.

    Let me know if I didn't understand correctly your question.
     
    pareylook likes this.
  3. pareylook

    pareylook

    Joined:
    Mar 4, 2016
    Posts:
    10
    Hm... I thought about it and I tried to change orientation to fly direction but It looked too harsh. But your advice gave me a new idea. I added physics torque when ball having collision. And It works! Thank you for your advice.