Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#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