Arcade Helicopter Physics

This is my attempt at recreating the handling and feel of the helicopter physics of the previous Battlefield games. If you haven’t played these games, yawing using the keyboard and pitching and rolling using the mouse might seem like an odd choice.
WASD to throttle and yaw
Mouse to pitch and roll
C to change from 1st to 3rd camera
Mouse sensitivity, inverting pitch as well as roll can be achieved in the url

I am largely satisfied with the result so far, but I might want a bit more conservation of forward velocities to get a little closer to the source material.


nice one. I find vehicles hard to control with mouse. for my arcade airplane I use only keys but ultimately want to use controller like google daydream with a gyro.
Do you think about adding raycast vehicle for wheels and suspension?

Wow! This seems to work very nicely. Congrats.
If I can make just a small suggestion (being a fan of flightsim). It seems to me that when you try to hover, going backwards just a little to decrease velocity, you are eventually loosing too much altitude/trust/drag. Else, I actually nearly managed to make a proper landing on a building with a fairly realistic feeling. A really good start for this handling that’s nothing EZ to master (somewhere between simu and arcade). I’m really eager to see your next steps :heart_eyes: Meanwhile, have a great day :sunglasses:

Nice job @Raggar I can totally see I am not ready to ride a chopper :slight_smile:

1 Like

that’s great!!!

Can I ask about the dev stack? what physics engine have you used?

CC @PirateJC

1 Like

I’ve logged hundreds of hours in an Apache helicopter on Battlefield - we played everyday when I worked for NATO. We didn’t have internet access - it was an approved game for the “office”. It seems to drift a lot more in your version - that makes it harder to recover. I seemed to end up crashing quite easily - LOL. Maybe I’m too out of practice! :smile:

LoL; That’s why I said the handling is between arcade and sim :grin: May be you should try DCS instead of Battlefield :rofl:
Jokes apart, as I said, there is still some fine-tuning to be made (my opinion only). But then, one would need to account the difficulty of the task. It’s already amazing to see this here (again, my opinion only).

1 Like

Excellent works. In most cases, the mouse is not suitable for simulating the joystick of the aircraft, because it will not automatically return, which makes it difficult for the aircraft to hover normally during the landing phase. You can consider adding support for gamepad. For keyboard and mouse, I suggest you simplify this part of the operation. Or, you can display the status of the joystick in the GUI (such as the icon effect of a joystick, displaying the position information of the joystick), which provides a reference for players when using the mouse to return the virtual joystick; :smiley:

1 Like

Excellent feedback. Totally agree. I would usually use a stick because of what you said with the mouse behavior not going back to ‘neutral’ or ‘dead zone’. May be just implement a ‘hover’ mode (triggered by a kb) that will make the copter entering hovering mode from its current state. We’ve seen that kind of helper before in other arcade or even (entry level) simu games, didn’t we?

1 Like

Not for this one, no. If Make a jet at some point, it will certainly need wheels

Edit: Did you base your airplane on anything?
I’ve tried implementing the following two:

But I have trouble tuning it or figuring out if I have some implementation bugs/issues, due to not fully understanding the underlying maths and code. For the time being I think I’m better off starting with something simple

I actually specifically made it so you can’t look up for too long before building up quite a bit of backwards momentum. I did this as BF does this. Whether they did this to prevent you from shooting at target from beneath them, or it is a side effect of their implementation, I don’t know.
I’m hoping for something easy to get into, but hard to master

Edit: I believe BF is somewhat simcade. And yeah, it needs quite a lot of fine-tuning

This was my first time using Vite(and just vanilla JS), as I recently found out Snowpack isn’t actively maintained anymore. Was Very easy to get into. The physics engine is this one: js3d/src/physics at master · d07RiV/js3d · GitHub
Might actually be a good idea to actually ask the guy if he is okay with me using it. It only has the Very basics, but compared to Any other JS physics engine, it is very cleanly coded

1 Like

Well, I had to try my best from memory, as my GPU gave up on me a loong time ago, so I’m stuck with a 8600GT. Before that I played BF3(MP), since being banned from BF4 for excessive glitch hunting. Well, I guess I was banned for “testing” the glitches, not finding them.
Now I can only play a bit of BF2142 once in a while.

Based on your inputs, I think I should expose as many variables as possible, so it’s easier to customize both handling and controls.

Nice! I never played a Battlefield before so I def wasn’t accustomed, but after a few crashes I think I got the hang of it :rofl: The trick to me was to not move the mouse too much, just a little bit to adjust the direction :stuck_out_tongue:

1 Like

Good! Now try to do the same with shots coming in from all angles and you will be ready for Battlefield :grin:

Def not ready for that yet! :rofl: