- Home /
realistic bullet trajectory
Hi I'm trying to simulate bullet trajectory like in "Sniper Ghost Warrior" game
for example: 5.56*45 mm caliber has 60 grains(0.003887935 kg) and velocity is 3100 feet per second(944.88 meters per second)
(data from http://home.comcast.net/~stephentmon...Comparison.txt)
problem:
1.I have set rigidbody to a sphere (for testing still not have bullet model), set its mass to 0.003887935 how much drag i should set?
2.Which one should i use; rigidbody.velocity , rigidbody.Addforce or rigidbody.AddForceAtPosition and what ForceMode?
3.assume that i fired a bullet in Vector(0,0,933) and another wind vector come from right side assume (-X,0,0), i want the direction of bullet changed by the force of wind. how do i perform this????
ps.If you have greater idea please tell me.
sorry for bad English
I would not use the physics engine to simulate the bullet trajectory, it is not designed for these low-mass, high-velocity calculations. Ins$$anonymous$$d, calculate the trajectory yourself and manually position your bullet.
Answer by AdamEstone · Sep 21, 2011 at 09:14 PM
Don't use a ridgedbody to shoot with!It makes problems collider because it is too fast!
Use the Raycast commands to define: hitpoint, distance, check for tag's and ect. 2. Go to THIS Youtube page/video. Look at the end of it, and you will see how the Raycast is done.
I dont know :/
Hope it gave you a kick.
-LoLypopboy.
Well, the OP specifically doesn't want to to this, because they need to have super-accurate bullet physics for their game. Also, this is some serious necromancy you're doing here! This question is from almost a year ago.
I think the way LOL_ypop_boy is the way to do it, do the maths calculations based on real world physics maths with a realistic range in the variables and the raycast information of the scene.
Yes, but sakamotomiwa specifically wanted a bullet which has a definite curving trajectory- a straight raycast is definitely not this! Raycasts are hardly physics simulations- the fact that they are performed with the Physics class in unity is purely coincidence.
You can define a curve from the information you get from raycast.