Hello
How can reset my Object(player)to 0,0,0 when out of range my floor(cube).
My project is like Roll-a-Ball project without walls
Maybe you want to set position to where it starts :
Vector3 startPos;
void Start()
{
startPos=transform.position;
}
void Update()
{
if( /*ItWentOut*/ )
{
transform.position=startPos;
}
}
thx
/out of rage/ script ?
cube Scale (50,1,75)Position(0,0,0)
my player is a sphere and my range is cube scale.
this script worked
if( gameObject.transform.position.x >= 25 |
gameObject.transform.position.x <= -25 |
gameObject.transform.position.z <= -37.5 |
gameObject.transform.position.z >= 37.5)
{
transform.position = new Vector3(0, 1.1f, 0);
}
Thanks a lot for the help!