I need to make an "AI" that makes a ball try to touch the player. But Vector2.MoveTowards()
needs a Vector2 variable but how do i get the location of an object?
|
||||
|
As Vector2 is a type composed by two numbers which are x and y, then you should be able to get the position by asking both numbers:
So you should use something like:
|
|||||||||||||||||||||
|