Hi guys. I am learning about some Unity features and today I was playing around with the Instantiate function.
After writing this quick script…
public class PlayerFeatures : MonoBehaviour {
public GameObject projectileBoomerang;
Object clone;
//public Object clone;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public void InitializeBoomerang(PlatformerPhysics mPlayer)
{
clone = Instantiate(projectileBoomerang, mPlayer.transform.position, transform.rotation);
}
I am not sure on how to change some of the properties of my boomerang object, for example, the speed. I would like to create more than one boomerang using this method, with each of them having a different moveSpeed.
Thanks.