Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Roll-A-Ball tutorial error when attaching movement script to ball

$
0
0
I am new to Unity (and a beginner C# programmer), and am going through the Roll-A-Ball tutorial. I am at the point where I am attaching a script that handles the movement input for the ball. After completing the code and trying to playtest, I get this error: "Assets/_Scenes/Scripts/PlayerController.cs(14,27): error CS0120: An object reference is required to access non-static member `UnityEngine.Rigidbody.AddForce(UnityEngine.Vector3, UnityEngine.ForceMode)'". I triple checked and I typed everything correctly, so I am at a loss as to what to do. Any help would be appreciated, thank you.

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>