Hi, i’m trying to make a Pacman in unity, i’m a beginner and i’m using the 3D tools of unity i think reproduce simple games its a good way to start. I had sucess making the moviment system, the player press WASD and the pacman(a cube :v) move constantly in that direction untill the player pressa another WASD key. I use transform.Translate to did it and i didnt use rigidbody/boxcollider.
Now, my problem is to make the cube stop when colide a wall, i tried(dont know if was the right way) use OnTriggerEnter/Stay and OnCollisionEnter/Stay but didnt had sucess, a friend suggest i use RayCast, this is a good ideia? how i use it?. Like i said, i’m beginner(unity and programming), so if you can help i’ll aprecciate.
Sorry my bad english, isnt my main language.