Quantcast
Channel: Latest Questions by Wrymnn
Viewing all articles
Browse latest Browse all 131

Why isn`t my 2D AddTorque working?

$
0
0
Hello I have this C# script attached to player in Fixed Update: rigidbody2D.AddTorque(Input.GetAxis ("Horizontal") * 5f); It just won`t work. AddForce works and everything else in that script just not this. What I have tried so far: if(Input.GetButton("Horizontal")) rigidbody2D.AddTorque(5f); Even this won`t work in Update without any key check: rigidbody2D.AddTorque(5f); Yes script is attached, Yes object has Rigidbody2D. As I said, AddForce works, just torque not. **Is Kinematic and Fixed angle are Checked OFF.** Please help I am getting hopeless.

Viewing all articles
Browse latest Browse all 131

Trending Articles



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