Skip to content

Instantly share code, notes, and snippets.

@WakkyFree
Last active Feb 14, 2020
Embed
What would you like to do?
Unity script to shoot a ball
using UnityEngine;
using System.Collections;
public class ShootBall : MonoBehaviour {
// Use this for initialization
void Start () {
float z = 2000; // force strength;
Rigidbody rigidbody = GetComponent<Rigidbody>();
rigidbody.AddForce(0, 0, -z);
}
// Update is called once per frame
void Update () {
}
}
@UrMummasRoadnan

This comment has been minimized.

Copy link

@UrMummasRoadnan UrMummasRoadnan commented Feb 14, 2020

its asking for shoot switch but I cant find that on his acc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment