Reputation:
I get multiple errors whenever I run this code:
transform.rotation = Quaternion.FromToRotation (Vector3(0, 0, 0), Vector3(0, 0, 270));
Can you suggest a fix for this code?
Errors:
Expression denotes a type', where avariable', value' ormethod group' was expected
The best overloaded method match for
UnityEngine.Quaternion.FromToRotation(UnityEngine.Vector3, UnityEngine.Vector3)
has some invalid argumentsArgument #1' cannot convertobject' expression to type
UnityEngine.Vector3
Upvotes: 1
Views: 888
Reputation: 2280
Assuming you're using C#, you should use new Vector3()
instead of Vector3
Upvotes: 5