Aircraft control surfaces: E2 coding help requested
1 replies, posted
[t]http://25.media.tumblr.com/82183d8649e0087e34aff01b952667b0/tumblr_mvr50sQA0q1qjhd9wo2_1280.jpg[/t]
Been building more planes as of late.
Though their performance using fin-enabled airfoils works nice, I nonetheless feel like a mingebag by simulating control surfaces using wire thrusters. Granted, it’s a balanced method, in that it's not like some peoples’ E2-powered aircraft you can rip apart, yet will still fly perfectly in a lack of wings and less than half a fuselage. However, it nonetheless feels rather placeholder and inelegant, and can often be finicky and result in poor handling. I’ve been meaning to make something ACF powered, and using E2 as a more streamlined maneuvering system, but I know approximately Jack Shit about coding E2, despite referring to the Wiki and various tutorials. Thus, I think consulting the community directly may be in order, if it's not too much trouble.
While it’d be convenient if I scrounged up a balanced chip somewhat akin to what I’m looking for, I figure having the know-how to make the chip myself would be a lot better, since I’d know the ins-and-outs of how it works and not have to rely on folks to do stuff for me like I’m some kind of E2 welfare queen. Please note that, before you reply to the following with "oh that's easy, just use applyforce" or whathaveyou, you must bear in mind that I'm really, really dumb. I know what applyforce is (having seen tutorials, Wiki articles, and Wiremod forum posts), but not how to plug it in and make it functional.
[B]How it might work:[/B]
[U]Cliffnotes Version: simulated control surfaces with pitch and roll controlled by mouse, which control akin to mouse controls in War Thunder or somesuch.[/U]
Stuff relating to propulsion- such as propeller rotation and throttle control- needn’t be included since that part I already have down, with and without ACF.
Control surfaces would be simulated by force being applied on or by entities (designated by entity markers wired to the E2?) representing the ailerons, elevator and rudder. Pitch and roll axes could possibly be controlled by the mouse, using something related to where the player in the pilot’s seat is looking- when pointed at some “central point”, attitude remains constant. The further the mouse strays from a central point, the more force is applied in the appropriate axis. (For example- nudge the mouse slightly to the left, and a plane will continue to gradually bank left until moved again.)
Like in most games that involve flying, I figure the camera would be locked forward while the player is flying. One output could be a sort of “free look” function, wherein mouse control is disabled and the camera is unlocked. (For example, by wiring it to the “alt” key, the camera will unlock as long as alt is held down, allowing the player to look around.)
Since I'm thick, I figured I'd make some diagrams that might just help illustrate:
Fig. a: The different "control surfaces" and their respective force vectors.
Fig. b: Example of using mouse control to bank to the left.
[t]http://i109.photobucket.com/albums/n48/Csp499/e2_zps29bda34b.png[/t]
Wiremod.com would probably be the best place for such things.
Sorry, you need to Log In to post a reply to this thread.