EVENT_FRICTION

ENABLE_FRICTION

Kollidiert eine Physik-Entity mit einem Hindernis, wird dieser Event ausgelöst. Kollidieren zwei Physik-Entities miteinander, löst jede einen EVENT_FRICTION-Event aus.

Modifiziert:

target Kontaktpunkt
normal Normalen-Vektor der getroffenen Oberfläche
bounce

Vekktor in Abprallrichtung

Beispiel:

function bounce_event()
{
  if (event_type == EVENT_FRICTION) 
  {
    ent_playsound(my,whamm,50);
  }
}


action bounceball() 
{
  my.ENABLE_FRICTION = ON; // C-Script: make entity sensitive for physics collisions
  my.emask |= ENABLE_FRICTION; // lite-C
  my.event = bounce_event;
  ... // initiate physics behavior
}

Siehe auch:

event, physics, target, normal, bounce

► Aktuelle Version Online