Quantcast
Channel: Questions in topic: "realistic"
Viewing all articles
Browse latest Browse all 146

Aim helper in realistic sniper game

$
0
0
I'm making a sniper game with gravity and wind influence on bullet. I'm moving bullet with constant velocity in forward direction and adding physics.gravity*Time.FixedDeltatime. So if there is a target 300 units away my bullet with take 36 frames to reach it(300/velocity*Time.FixedDeltatime) which we will call predictedFrames, when i multiply predictedFrames with gravity it should give mei the y position of bullet after 36 frames but it gives me the wrong position. I did Debug.Log(physics.gravity*Time.FixedDeltatime) and it give me -0.2 which should be the gravity per frame but it's not, after the first frame bullet y position is 0.0011 something. I did everything but nothing worked. plz help

Viewing all articles
Browse latest Browse all 146

Trending Articles



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