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

Throwing a gameObject based on distance (2D)

$
0
0
Hi there, i'm having trouble to make a throwing script,i want to throw the green square above the black one I tried to get the distance between them, set dist.x *= 0.8f and then addForce(dist),but depending on the distance, the green square flies like crazy :'( I have searched too for throwing at a certain angle and speed, and the use of addForce vs translate, but could not found an answer for this problem; any thoughts? ![alt text][1] [1]: http://i.imgur.com/tD3xCTD.png?1

Viewing all articles
Browse latest Browse all 1264

Trending Articles



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