hi,
i am making a simple 2d game in which i require that when the character goes half out the frame from one side the other half side can be seen on the other side. i am trying to explain my point with a image here
the code i am currently using for this is
if(transform.position.x > 23.49712)
{
transform.position.x = -23.49712;
}
if(transform.position.x < -23.49712)
{
transform.position.x = 23.49712;
}
i know this code is no solution to the problem but i have no idea how to go about this.