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 Bullet : MonoBehaviour {
- public GameObject origin;
- public Rigidbody me;
- public float bulletSpeed = 1000f;
- void Start ()
- {
- Vector3 dir = new Vector3 (origin.transform.localRotation.x, origin.transform.localRotation.y, origin.transform.localRotation.z);
- me.AddForce (dir * bulletSpeed);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement