Is there anyone that knows what this line of code would be in c# from js that is provided with the third person character controller script from the Lerpz demo?
var grounded = IsGrounded();
trying to translate the code from js to c# for a school project but this line just baffles me.
The main difference with C# here is that a variable declaration can’t infer the type from the return value of the function. You have to declare it explicitly:-
this line is giving me issues now…I assumed it would be transform for the variable in c# but unity doesn’t seem to accept that is there another variable name that is required for this type?
is what I thought it would be. I’m kind of going line by line in translating the code from JS to c# for this school project of mine so I’m hoping I won’t run into any more issues after I start figuring out more of the scripting and variable names for unity.
Still a little new to how scripting works in unity as you can tell from what I said earlier haha.
Ok, thank you, I believe I tried that to but it still gave me an error. But I’ll give it another try and see if it takes it this time, in case I never did try that.