Search Unity

Ball flying up off the ground

Discussion in 'Physics' started by pedrohb88, Aug 28, 2017.

  1. pedrohb88

    pedrohb88

    Joined:
    Aug 23, 2017
    Posts:
    16
    I'm learning about unity by doing a zig zag game. The game is very simple, mouse click = direction change by changing the velocity vector of the ball's Rigidibody. But does not matter what i do, the ball always get up off the ground in the beggining of the track, it starts to lift up exactly on platforms divisors ( I've tried to scale the start platfom to a bigger one and the problem didn't happen).

    Obs: changing the ball's direction after it starts to get off the ground stops the "flying"
     

    Attached Files:

    • ball.png
      ball.png
      File size:
      605.4 KB
      Views:
      814
  2. Plystire

    Plystire

    Joined:
    Oct 30, 2016
    Posts:
    142
    Try checking "Freeze Position" for the Y direction?
    You need to realize you've enabled the entire 3D physics engine for what looks to be an isometric scroller. You've also turned off gravity for the object, so it will free-float like an astronaut. Probably not the best approach...
     
  3. pedrohb88

    pedrohb88

    Joined:
    Aug 23, 2017
    Posts:
    16
    I've tried it, but the ball keeps "boucing" as it wants to fly up
     
  4. Plystire

    Plystire

    Joined:
    Oct 30, 2016
    Posts:
    142
    You may be better off controlling the ball's movement yourself instead of relying on the physics engine. Your setup looks simple enough and the physics engine might be overkill.

    Maybe explain better the end result you're shooting for? If it's a simple back and forth motion, I don't think controlling it through physics is the best approach.