Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualOberon_Command

Posted 22 July 2013 - 06:15 PM

transform.RotateAround(mountain.transform.position, Vector2,20 * Time.deltaTime);

 

I'm going to guess that the bolded part is supposed to be the rotation axis? If so, you should actually pass it an axis, ie. an instance of a Vector3. Right now you're passing it the type Vector2. RotateAround() expects two Vector3s and a float, and right now you're giving it a Vector3, a type, and a float, just like the error message says.

 

Next time you can solve something like this more quickly by reading what the error message is saying. If you compared the error message to the actual function signature of RotateAround (found here), I think you would have spotted the problem pretty quickly. Error messages are there for a reason. ;)


#1Oberon_Command

Posted 22 July 2013 - 06:13 PM

transform.RotateAround(mountain.transform.position, Vector2,20 * Time.deltaTime);

 

I'm going to guess that the bolded part is supposed to be the rotation axis? If so, you should actually pass it an axis, ie. an instance of a Vector3. Right now you're passing it the type Vector2. RotateAround() expects two Vector3s and a float, and right now you're giving it a Vector3, a type, and a float, just like the error message says.

 

Next time you can solve something like this more quickly by reading what the error message is saying. ;)


PARTNERS