![alt text][1]
ı want to move my character inside this circle like super sonic. He will turn around inside circle then will exit from circle. I did entering and exiting parts but cant do movement.
( ruCollider : Collider 2D component of round-up object , rdCollider is for round-down)
Here is my Code
enter code here private void OnCollisionEnter2D(Collision2D col)
{
if(col.gameObject.name=="downright"|| col.gameObject.name=="topright")
{
downleftcol.enabled = true;
topleftcol.enabled = true;
}
for (float timeStart = 0; timeStart < 3; timeStart += Time.deltaTime)
{
if (col.gameObject.name == "topleft"|| col.gameObject.name=="downleft")
{
downrightcol.enabled = false;
toprightcol.enabled = false;
}
}
ı have a circle like this. Its made of 4 parts top-left , top-right , bot-left, bot-right but i cant move inside of it .What should i add to my code ?