Skip to content
Permalink
8544c74d8d
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
16 lines (14 sloc) 495 Bytes

using UnityEngine;
using System.Collections;
public class Nozzle : MonoBehaviour {
// Creates pixels at nozzles position
public void SpawnPixel(GameObject pixelPrefab){
//create GameObject pixel;
GameObject pxl;
//set variable new pixel object
pxl = (GameObject)Instantiate (pixelPrefab, transform.position, transform.rotation);
//push object using Rigidbody Component
pxl.GetComponent<Rigidbody>().AddForce (new Vector3(10000.0f, 0.0f, 0.0f), ForceMode.VelocityChange);
}
}