Quantcast
Channel: Answers by "Foose"
Viewing all articles
Browse latest Browse all 34

Answer by Foose

$
0
0
The best option is to make your object a rigidbody that behaves under physics. You can now change your "speed" with "rigidbody.addforce" this will add a force that pushes the ridigbody. after you have left the key, the force will no longer be added to the rigidbody and it will slowly fade out. By adjusting the "mass" of the rigidbody u can choose if it should stop directly after leaving the key if the mass is high, or gettinger slower very slowly, if the mass is very low. http://docs.unity3d.com/ScriptReference/Rigidbody.AddForce.html

Viewing all articles
Browse latest Browse all 34

Trending Articles



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