Hello all, I have been trying to get this script to work but I am pretty sure I am writing it wrong because it isn’t working. Basically it attached a gameObject (in this case a sphere) to the mouse so when I move the mouse it follows it. If you could tell me how to fix this and maybe show an example or give some tips it will be greatly appreciated. Here’s the script:
var ball : GameObject
function Start () {
Instantiate(ball);
}
function Update () {
GameObject.Find(ball), Camera.ScreenToWorldPoint(Input.mousePosition);
}
Thank you:)