Answer the question
In order to leave comments, you need to log in
Movement of many objects according to one principle?
There are scripts:
public class Movement: MonoBehaviour
{
//calculates the destination according to the general algorithm, changes it through a getter
}
public class Rooms: MonoBehaviour
{
//also calculates the destination
}
public class Persona: Movement
{
private Vector2 destination;
// attached to people-objects that change their positions based on destination
}
I can't figure out how to make destination separate for each person - they all take the same common value and go to the same point in a friendly swarm .(
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question