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

Constraint an object speed

$
0
0
Hello, I don't want my ball goes at a greater speed as I set in "AddForce()". Is this code correct ? void Update() { if (ball.GetComponent().velocity.magnitude > 250.0f) { ball.GetComponent().SetMaxAngularVelocity(250.0f); } }

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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