Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.28 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Obstacles : MonoBehaviour {
  6.  
  7.     Rigidbody rb;
  8.     public float speed = 300;
  9.  
  10.     void Start () {
  11.         rb = GetComponent<Rigidbody>();
  12.         rb.AddForce(-speed, 0, 0);
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement