Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Enemy Shooting at the MainCamera (Player) Script

Discussion in 'Scripting' started by virtual46, Jan 21, 2015.

  1. virtual46

    virtual46

    Joined:
    Jan 12, 2015
    Posts:
    2
    Hello,

    Can anyone please help me out in a script where the enemy is shooting at the player. The player is present behind the main camera and the bullets fired by the Enemy must hit Random places on the Main Camera each time. Please help.

    Thanks in advance.
     
    Deleted User likes this.
  2. tobyheadcast

    tobyheadcast

    Joined:
    Aug 5, 2014
    Posts:
    25
    Your approach sounds a bit off here. The camera is a point. Do you mean hit different parts of the screen ?
     
  3. virtual46

    virtual46

    Joined:
    Jan 12, 2015
    Posts:
    2
    Ya right, I consider my player to see Just the enemy who is shooting at him.