Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Obstacles : MonoBehaviour {
- Rigidbody rb;
- public float speed = 300;
- void Start () {
- rb = GetComponent<Rigidbody>();
- rb.AddForce(-speed, 0, 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement