using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CoconutSpawn : MonoBehaviour {

    Rigidbody rb;
    float jumpForce = 6;


    private void Awake() {
        rb = GetComponent<Rigidbody>();
    }

    void Start() {
        float angle = Random.Range(30, 180-30);
        Vector3 force = new Vector3(Mathf.Cos(angle) * jumpForce, Mathf.Sin(angle) * jumpForce, 0);
        rb.AddForce(force, ForceMode.Impulse);
    }
}
