- Home /
Question by
lukasmathews2001 · Jul 14, 2018 at 08:58 AM ·
game design
,setting a game object to the origin
,i made a simple bouncing ball. it bounces off the wall but eventually leaves how do i transform it back to the center?
so far i have come up with this code but i am not sure what to do with it
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class bounds : MonoBehaviour transform.position == Vector3 ( 0f, ,0 ,0);
Comment
Answer by Zymurer · Jul 14, 2018 at 09:25 AM
You need to assign it to your ball.
It moves your ball to the origin.
Your answer
![](https://koobas.hobune.stream/wayback/20220612170658im_/https://answers.unity.com/themes/thub/images/avi.jpg)