SimplePlanes

SimplePlanes

View Stats:
Plebian Jan 26, 2016 @ 4:59pm
guns shooting the propeller
airplanes for most of WWII (not counting the ones in very early WWII) didnt shoot the prop blades because they had internal timing mechanisms that stopped the guns from firing when a blade passes in front of them

im pretty sure this game takes place in modern day, so this should be a thing
< >
Showing 1-6 of 6 comments
Plebian Jan 26, 2016 @ 8:25pm 
not a single comment yet, hmmm
ptarpley  [developer] Jan 26, 2016 @ 9:01pm 
Each bullet in SimplePlanes is simulated as an individual "body" which flies through the air...they collide with whatever they hit, so it isn't really feasible.

They fly through the air and collide with the force dependent upon the weight/speed of the slug, and just straight-up impact and then break stuff off just like anything else would in the game. There is no "A bullet hit, so now destroy stuff" code..it just happens naturally via the physics simulation.

The WWII planes accomplished such a feat (for the most part anyway...they blew themselves up on occasion) by carefully timed firing with the engine RPM.

But, we allow placing guns anywhere, with multiple engines, and even rotating guns/engines. It would be a nightmare to try to make this work, unfortunately.

I understand the want for something like this though...it would be pretty sweet though.
Last edited by ptarpley; Jan 26, 2016 @ 9:23pm
Plebian Jan 26, 2016 @ 9:21pm 
Originally posted by ptarpley:
Each bullet in SimplePlanes is simulated as an individual "body" which flies through the air...they collide with whatever they hit, so it isn't really feasible.

They fly through the air and collide with the force dependent upon the weight/speed of the slug, and just straight-up impact and then break stuff off just like anything else would in the game. There is no "A bullet hit, so now destroy stuff" code..it just happens naturally via the physics simulation.

The WWII planes accomplished such a feat (for the most part anyway...they blew themselves up on occasion) by carefully timed firing with the engine RPM.

But, we allow placing guns anywhere, with multiple engines, and even rotating guns/engines. It would be a nightmare to try to make this work, unfortunately.

I understand the want for something like this though...it would be pretty sweet though.

i see
JAGIELSKI Jan 26, 2016 @ 11:22pm 
Originally posted by ptarpley:
Each bullet in SimplePlanes is simulated as an individual "body" which flies through the air...they collide with whatever they hit, so it isn't really feasible.
I have a solution for you, as a fellow unity programmer. Collision layers. Just make bullet prefab and blades use separate layers, then set up collisions so bullets wouldn't collide with layer blades are on. Problem solved.
Game Over, Man Jan 27, 2016 @ 8:09am 
Or possibly check for intersection between the front of the gun and the planes propeller, and if true, spawn the bullets in front of it
ptarpley  [developer] Jan 27, 2016 @ 8:16am 
Thanks guys. I know we can make them not collide at all if we wanted to, but we want the bullets to be able to hit them in most cases.

At any rate, the bullets do spawn a bit in front of the barrel currently, so you can place a gun behind a prop if you put it RIGHT behind it.
< >
Showing 1-6 of 6 comments
Per page: 1530 50

Date Posted: Jan 26, 2016 @ 4:59pm
Posts: 6