hello everyone
i was trying to make 2D Endless Running Game with Unity3D
but i got little problem :
in Scene i have 4 Plane
1- Plane “1” Look exactly Like Plane “4”
2- the player start Running from The Half of Plane “1”
What i was trying To Do
When Player Be In The Half Of Plane “4”
He Teleport/Reposition and Go Again to Half Of Plane “1”
I Created This Code
public Transform StartPoint;
public bool RePut;
public Transform Player;
void Start () {
Player = GameObject.FindGameObjectWithTag("Player").transform;
}
void FixedUpdate () {
if(RePut){
Player.transform.position = StartPoint.position;
RePut = false;
}
}
void OnTriggerEnter(Collider Col){
if(Col.tag == "Player"){
RePut = true;
}
}
This Code Work Already
but the problem that its not smooth
i can feel that i got teleported or something happen
is there way to make it smoother?
and thanks