hi i’m making a button called moveup and then I add a event trigger component, then I add a new PointerDown trigger on that compnent, then I add my player to the object slot, then in the function slot I add the function OnClickMoveUp()
In my function I write:
public void OnClickMoveUp()
{
transform.Translate(Vector3.up * forwardSpeed * Time.deltaTime);
}
This doesnt work, I want the player to keep moving when I press the button, then stop when im not pressing the button?