- Home /
Question by
Borzi · Sep 25, 2013 at 04:38 PM ·
mouse lookjava to c#argumentref
"Ref Float" for Mouse Look script?
Hey, I am trying to convert a script from Java to C# and apparently I need a "ref" variable (in this case Argument 3). Anyone know how I could convert that?
currentXRotation = Mathf.SmoothDamp(currentXRotation, xRotation, xRotationV, lookSmoothDamp);
Comment
Best Answer
Answer by robertbu · Sep 25, 2013 at 05:44 PM
You need to put the 'ref' keyword in front of the parameter.
currentXRotation = Mathf.SmoothDamp(currentXRotation, xRotation, ref xRotationV, lookSmoothDamp);
Note if you go to the reference and change the "Scripting Reference Using" in the upper left corner to C#, it will show you the examples in C#.