Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Watch how she moves.
If it is attached, then you just need to change this coordinate every frame to what you need. Let's say, calculate what the relative displacement should be, given the position of the player in the world.
void LateUpdate() {
float x = ...........; // вычисляете, на что сменить.
transform.position = new Vector3(x, transform.position.y, transform.position.z);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question