"rigidbody.addforce not working" Code Answer's
You're definitely familiar with the best coding language C# that developers use to develop their projects and they get all their queries like codeprozone.com/code/csharp/31197/rigidbody.addforce-not-working.html"rigidbody.addforce not working" answered properly. Developers are finding an appropriate answer about rigidbody.addforce not working related to the C# coding language. By visiting this online portal developers get answers concerning C# codes question like rigidbody.addforce not working. Enter your desired code related query in the search bar and get every piece of information about C# code related question on rigidbody.addforce not working.
rigidbody.addforce not working:
//Even though Unity says that transform.forward = Vector3(0, 0, 1) that is not the case
//This is the line that you want
gameObject.GetComponentOfType().AddForce(transform.forward * 200,ForceMode.Impulse);;
//This line will give you seemingly random values
gameObject.GetComponentOfType(). AddForce(new Vector3(0, 0, 200, ForceMode.Impulse);
|