• Benvenuto in Making Videogames!
  • Dai sfogo alla tua fantasia!
  • Crea il tuo Videogioco!
Benvenuto ospite! Login Registrati




Valutazione discussione:
  • 0 voto(i) - 0 media
  • 1
  • 2
  • 3
  • 4
  • 5
problema rotazione torretta
#3
si,ecco

function Update ()
{
nemico = GameObject.FindWithTag("Nemico");
transform.LookAt(nemico.transform);
if(on && Vector3.Distance(nemico.transform.position, transform.position)<distanza)
{
Sparo();
on = false;
}
}

function Sparo ()
{
var Bullet : GameObject = Instantiate(colpo, SpawnBullet.position, SpawnBullet.rotation);
Bullet.rigidbody.AddForce (SpawnBullet.forward * Forza);
yield WaitForSeconds (TempoRicarica);
on = true;
}
 
Rispondi
  


Messaggi in questa discussione
problema rotazione torretta - da giggimito - 27-08-2015, 04:04 PM
RE: problema rotazione torretta - da Zettamax - 27-08-2015, 07:03 PM
RE: problema rotazione torretta - da giggimito - 27-08-2015, 07:29 PM
RE: problema rotazione torretta - da encelo - 27-08-2015, 10:17 PM
RE: problema rotazione torretta - da Zettamax - 28-08-2015, 11:54 AM
RE: problema rotazione torretta - da giggimito - 28-08-2015, 02:43 PM
RE: problema rotazione torretta - da Zettamax - 28-08-2015, 03:14 PM
RE: problema rotazione torretta - da giggimito - 28-08-2015, 04:26 PM
RE: problema rotazione torretta - da Zettamax - 28-08-2015, 05:12 PM
RE: problema rotazione torretta - da giggimito - 28-08-2015, 05:29 PM

Discussioni simili
Discussione Autore Risposte Letto Ultimo messaggio
  script rotazione sprite giggimito 8 1,112 23-12-2014, 01:38 AM
Ultimo messaggio: Blackg96
  Script rotazione PàOlo_TM 4 707 12-07-2013, 11:13 PM
Ultimo messaggio: Cervian

Vai al forum:


Browsing: 1 Ospite(i)