Hello dear Unity forum users, I am a beginner in unity and beginning to understand parts of basic scripting (I graduated in 3d max design animation, so this is completely new to me). Hoping you guys can help me out with this little problem I am having at this point of my game.
Would really appreciate it if you dumbed it down for me, when i look at rays and arrays starts to give me a headache lol.
oK so the game is basically objects falling and user trying to stop them midair when ever they click on them objects gets pushed on “x” excess and stops. so far my code is on enemy
var speed = 1;
function Update () { transform.Translate(0,-speed*Time.deltaTime,0);
if(transform.position.y <= -6){
transform.position.y = 5;
transform.position.z= Random.Range(-2.1,1.9);
} } } function OnMouseDown () { Debug.Log(“clicked you”) }
Please help!!