You should post your script, such that we can see what is going on. The line number at which the error occurs is also important. Don’t forget to use code tags:
I just tried your script and changed the Rigidbody.Addforce to rigidbody.AddForce and, provided you fix the second last bracket there, it works fine (including code completion).
No worries. =)
The capitalized Rigidbody is it’s own thing and is used differently, but it seems to be what appears first. That’s why you’ll still get autocompletions for it, just not the ones you were after.
“Rigidbody” is the class name, whereas in this case, “rigidbody” is the name of a specific instance of that class. By using the class name you can access it’s static members, but not a non-static member of any instance of that class.
Thanks,
That explains a lot. Hope they update their tutorials.
How do I use GetComponent to obtain Addforce?
I am very new to Csharp. Hope you don’t mind helping me out.