Hi friends,
I am a beginner to both Unity Scripting and unity Community.
This question may be ameture but please answer if you can help
I am learning unity scripting and at present on beginning.
the tutor had wrote a script as follows-
this.transform.Rotate (new Vector3 (1f, 1f, 1f), 40 * Time.deltaTime, Space.Self);
but I am bit confused that how is it possible because when we go through the documentation of “transform.Rotate” then it says as about the constructors:-
public void Rotate(Vector3 eulerAngles, Space relativeTo = Space.Self);
public void Rotate(Vector3 eulerAngles, Space relativeTo = Space.Self);
as you can see tat we can add only 2 arguments that are Vector 3 object and Space.
You can even check it at this link Unity - Scripting API: Transform.Rotate
and as I had mentioned above that the instructor had added three arguments:-
- new Vector3 (1f, 1f, 1f)
- 40 * Time.deltaTime
- Space.Self
And the line of code is working and giving a bit different type of rotation so it is just making me curious to know about what had happened.
Please help .