Reputation: 59
I'm currently making an android game in unity3d. I want to make it so when you touch the screen the cube looks at the touch location and moves toward it. I tried doing a lookat script to the touch position but the rotation is weird and it doesn't move toward the touch.
Upvotes: 0
Views: 780
Reputation: 278
You can use Unity's built in Navigation System to make your object move from one point to the other, use a Ray to get the point that the player clicked on the screen, and use Transform.LookAt() to make your player look at that point.
Upvotes: 1