Invalid arguments in slerp error in C#
this.transform.rotation = Quaternion.Slerp( playerShip.transform.rotation, Quaternion.Euler(0,0,0), Time.deltaTime * 3.5 );
is giving me an error like :
Assets/ShipController.cs(56,62): error CS1502: The best overloaded method match for `UnityEngine.Quaternion.Slerp(UnityEngine.Quaternion, UnityEngine.Quaternion, float)' has some invalid arguments
Any guess why this is happening?
Thank you
Comment
Answer by tanoshimi · Feb 28, 2016 at 10:07 AM
You're supplying a double as the third argument, not a float:
this.transform.rotation = Quaternion.Slerp( playerShip.transform.rotation, Quaternion.Euler(0,0,0), Time.deltaTime * 3.5f );