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

public class chanclaVuelo : MonoBehaviour
{
    private float moveSpeed = 40;
    // Start is called before the first frame update
    void Start()
    {
        // GetComponent<Rigidbody>().AddForce(moveSpeed * transform.right, ForceMode.Impulse);
    }

    // Update is called once per frame
    void Update()
    {
        //volver velocidad 0 al colisionar
        // GetComponent<Rigidbody>().AddForce(moveSpeed * transform.right, ForceMode.Impulse);
        transform.position += transform.forward * Time.deltaTime * moveSpeed;
    }
    void OnCollisionEnter(Collision collision)
    {
        moveSpeed=0;
    }
}
