
Advertisement
Sign in to follow this
Followers
0
shooting missle/falling bomb from a ship
By
mickeyren, in Math and Physics
This topic is 3529 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.
If you intended to correct an error in the post then please contact us.
Recommended Posts
Advertisement
mickeyren 132
bomb? trajectory? hmm... i imagine the bomb should just falling downwards, and its head orienting/tilting towards the ground no?
The missile would be release halfway when the ship is halfway through its target. I probably should do the following for the missile:
1. When fired, push it down a bit.
2. Have it seek to the target.
I think these may be just bunch of path interpolation. The bomb would probably just orienting its head.
Anyway, i'm still open to other ideas.
The missile would be release halfway when the ship is halfway through its target. I probably should do the following for the missile:
1. When fired, push it down a bit.
2. Have it seek to the target.
I think these may be just bunch of path interpolation. The bomb would probably just orienting its head.
Anyway, i'm still open to other ideas.
0
Sirisian 2263
"An object in motion stays in motion unless acted on by an unbalanced force."
If you drop a bomb from a plane it will have the same velocity of the plane. The reason it doesn't stay with the plane is because lift on plane balances with gravity so the plane doesn't fall. The bomb on the other hand will gradually fall with an acceleration of 9.8 m/s^2.
The easiest way to get the rotation matrix of the bomb is by using the velocity of the object. Meaning the bomb will point in the direction it's moving. This is the simplest way to do it.
If you drop a bomb from a plane it will have the same velocity of the plane. The reason it doesn't stay with the plane is because lift on plane balances with gravity so the plane doesn't fall. The bomb on the other hand will gradually fall with an acceleration of 9.8 m/s^2.
The easiest way to get the rotation matrix of the bomb is by using the velocity of the object. Meaning the bomb will point in the direction it's moving. This is the simplest way to do it.
0
Lord Crc 234
Immediately after being released, the bomb will have the same velocity (and hence direction of travel) as the plane. There are then two forces acting on the bomb: gravity and air resistance.
Gravity is simple, F_g = m * g, where m is the mass of the bomb (in kg) and g is 9.81 m/s^2. The direction of this force is down.
Air resistance is a bit trickier, but can be approximated by F_d = 1/2 * C_d * v^2, where C_d is the drag coefficient of the bomb in air, v is the speed of the bomb (length of the velocity vector). The direction of the drag is the opposite of the velocity.
Lower drag coefficient will make it arc more slowly than a higher drag coefficient.
In order to orient the bomb, you can simply rotate it so that the length of the bomb is parallel to the velocity vector (either figure out the angle or just construct a rotation matrix directly from the velocity vector). I think that'll look good.
Gravity is simple, F_g = m * g, where m is the mass of the bomb (in kg) and g is 9.81 m/s^2. The direction of this force is down.
Air resistance is a bit trickier, but can be approximated by F_d = 1/2 * C_d * v^2, where C_d is the drag coefficient of the bomb in air, v is the speed of the bomb (length of the velocity vector). The direction of the drag is the opposite of the velocity.
Lower drag coefficient will make it arc more slowly than a higher drag coefficient.
In order to orient the bomb, you can simply rotate it so that the length of the bomb is parallel to the velocity vector (either figure out the angle or just construct a rotation matrix directly from the velocity vector). I think that'll look good.
0
mickeyren 132
Quote:
Original post by Lord Crc
Immediately after being released, the bomb will have the same velocity (and hence direction of travel) as the plane.
Hmm... I think I'm getting confused here.
The bomb shouldn't follow the same velocity as of the plane. I'm showing 2 images which shows the 2 types of behaviour i want to exhibit.
and
So I like a carpet bombing similar to the first screen shot.
I think you guys are pointing out how its suppose to behave on the second screen shot  but yes ill give that a try  without air resistance first. :)
0
Promethium 580
In your first image the bombs seems to drop straight down because the viewer is moving at the same speed as the plane dropping the bombs. The bombs fall under gravity but when they leave the plane they are moving forward at the same velocity as the plane. As soon as they leave the plane they will start to accelerate downwards (because of gravity). So the bombs follow a parabola, they don't drop straight down. The bombs will also loose some forward momentum because of air resistance, but you can probably ignore this for bombs dropped at low altitude.
0
boohillie 210
shurcool 439
Quote:
Original post by mickeyren Quote:
Original post by Lord Crc
Immediately after being released, the bomb will have the same velocity (and hence direction of travel) as the plane.
Hmm... I think I'm getting confused here.
The bomb shouldn't follow the same velocity as of the plane. I'm showing 2 images which shows the 2 types of behaviour i want to exhibit.
So I like a carpet bombing similar to the first screen shot.
I think you guys are pointing out how its suppose to behave on the second screen shot  but yes ill give that a try  without air resistance first. :)
No, they're not. The way they've described will perfectly model the 1st screenshot, as you want.
Quote:
If you drop a bomb from a plane it will have the same velocity of the plane. The reason it doesn't stay with the plane is because lift on plane balances with gravity so the plane doesn't fall. The bomb on the other hand will gradually fall with an acceleration of 9.8 m/s^2.
Read that over again and look at your screenshot.
In any case, here's a solution for you in simple math:
When a bomb is dropped:
bomb.position.x = plane.position.x
bomb.position.y = plane.position.y
bomb.velocity.x = plane.velocity.x
bomb.velocity.y = plane.velocity.y
Every time physics are updated:
bomb.velocity.y = 9.8 * time_passed_since_last update (in seconds)
bomb.position.x = bomb.velocity.x * time_passed
bomb.position.y = bomb.velocity.y * time_passed
Note that it only uses gravity and ignores air resistance, which isn't that important to get what you want.
0
shurcool 439
Quote:
Original post by shurcool
In any case, here's a solution for you in simple math:
When a bomb is dropped:
bomb.position.x = plane.position.x
bomb.position.y = plane.position.y
bomb.velocity.x = plane.velocity.x
bomb.velocity.y = plane.velocity.y
Every time physics are updated:
bomb.velocity.y = 9.8 * time_passed_since_last update (in seconds)
bomb.position.x = bomb.velocity.x * time_passed
bomb.position.y = bomb.velocity.y * time_passed
If you want to see that sort of physics in action, take a look at my Sopwith clone in Flash (a 2D sideview airplane fighting/bombing game).
http://www.cse.yorku.ca/~cs243104/Sopwith.swf Press F to take off, left/right arrow keys to turn, and B to release a bomb.
0
Sign in to follow this
Followers
0

Advertisement
Share this post
Link to post
Share on other sites