x


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

more ▼

asked Nov 24 '10 at 07:48 PM

Dot45 gravatar image

Dot45
32 12 14 17

I would not use the physics engine to simulate the bullet trajectory, it is not designed for these low-mass, high-velocity calculations. Instead, calculate the trajectory yourself and manually position your bullet.

Nov 24 '10 at 08:01 PM VS48
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first
  1. 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.

  1. I dont know :/

Hope it gave you a kick.

-LoLypopboy.

more ▼

answered Sep 21 '11 at 09:14 PM

AdamEstone gravatar image

AdamEstone
11 2 3 4

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.

Sep 21 '11 at 11:48 PM syclamoth

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.

Sep 22 '11 at 11:03 AM sacredgeometry

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.

Sep 22 '11 at 11:41 AM syclamoth

You can define a curve from the information you get from raycast.

Sep 22 '11 at 11:48 AM sacredgeometry
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1947
x320
x57

asked: Nov 24 '10 at 07:48 PM

Seen: 2661 times

Last Updated: Sep 22 '11 at 11:49 AM