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

Button reset

Discussion in 'Getting Started' started by skuky123, Feb 9, 2021.

  1. skuky123

    skuky123

    Joined:
    Feb 7, 2021
    Posts:
    14
    Hello every1,

    I have button triggered on key, that button calculates the force of the kicking ball(1-100). When I press event trigger key(space) powerbar is filling up, and after that ball is moving for calculated force, depended on powebar number. But when I continue hitting space, ball just continues moving based on last powerbar number. How I make my button resets, and ball movement at the same time aswell, so when I hit space powerbar should fill again, and make ball move again but by different force(depended on power bar ofcourse), so not remembering the last number, just reading the new one. Hope u understood me.
     
  2. skuky123

    skuky123

    Joined:
    Feb 7, 2021
    Posts:
    14
    Delete thread!