• 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
Spingere altro Giocatore ( SCRIPT )
#7
(22-02-2015, 07:55 PM)Master Gabriel Ha scritto: Ci dò un'occhiata, ma non garantisco niente. Però domani, adesso devo andare.

Ho fatto questo.
Il problema che non funziona con i Trigger.
Il problema è other.contacts[].point , funziona solo se other è un Collision , Collider.
void OnCollisionStay2D(Collision2D other)
{ if (other.gameObject.CompareTag("Player"))
if (Input.GetKey ("z")) {
Character.GetComponent<Rigidbody2D> ().AddForce (other.contacts [0].point * throwForce);
}
}
 
Rispondi
  


Messaggi in questa discussione
RE: Spingere altro Giocatore ( SCRIPT ) - da Master-Antonio - 22-02-2015, 08:09 PM

Vai al forum:


Browsing: 1 Ospite(i)