Skocz do zawartości

Rekomendowane odpowiedzi

Opublikowano

Jak zrobić aby:

1.Obiekt podążał za drugim obiektem.

2.Omijał przeszkody.

3.Był ciągle zwrucony w strone drugiego obiektu podczas podążania.

I jak możecie to połączcie to wszystko.

Tylko bez złych komentarzy :)

Opublikowano
I jak możecie to połączcie to wszystko.

mp_potential_step(x,y,stepsize,checkall) Like the previous function, this function lets the instance take a step towards a particular position. But in this case it tries to avoid obstacles. When the instance would run into a solid instance (or any instance when checkall is true) it will change the direction of motion to try to avoid the instance and move around it. The approach is not guaranteed to work but in most easy cases it will effectively move the instance towards the goal. The function returns whether or not the goal was reached.

Pasuje?

3. w stepie

direction=point_direction(x,y,drugi_obiekt.x,drugi_obiekt.y)

image_angle=direction

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...