Hi !
i tried to build my own jumping script but i failed so please can i use any help ??
anything can help me to build it
Hi !
i tried to build my own jumping script but i failed so please can i use any help ??
anything can help me to build it
Rigidbody2D rigid;
void Start () {
rigid = GetComponent<Rigidbody2D>();
}
void Update () {
if(Input.GetKeyDown(KeyCode.Space)){
Debug.Log("JUMP");
rigid.velocity = new Vector2 (0f, 10f);
}
}