hello,
i am trying to develop an app that similar to Roll-A-Ball and i tried to put the code of collecting the cubes in my app and it doesn’t work, i don’t have any errors , here is the code please help i need to give beta of this project in few days and it can cost me a lot of money
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerControl : MonoBehaviour
{
public Rigidbody2D rb;
// Use this for initialization
void Start()
{
rb.GetComponent();
}
// Update is called once per frame
void FixedUpdate()
{
rb.velocity = new Vector2(2, rb.velocity.y);
if (Input.GetKeyDown(“w”))
{
rb.velocity = new Vector2(rb.velocity.x, 3);
}
}
void OnTriggerEnter(Collider other)
{
if (other.gameObject.tag == “PickUp”)
{
other.gameObject.SetActive(false);
}
}
}
thanks a lot