I need to write/edit a script to control a helicopter with super basic movements.
WASD: forward, left, backward, right
Space: lift (it would be nice to have it float a bit when released)
That’s it. I have no real working knowledge of creating a script from scratch but I can make adjustments once I have one in place. Anything will help, even a link to something obvious!
This is my first time ever trying to script something in Unity.
Thanks!
do you have animation on your model?
I would start with the AngryBots controller and add to it the Unity wiki script for rigidbody spaceship controls since it has a rigidbody up/down/left/right that you could add upward propulsion to.
http://wiki.unity3d.com/index.php/ShipControls
That describes how to strip down the scene. Once it’s stripped check PlayerMoveController and FreeMovementMotor. If you add new controls to PMC and then add corresponding adjustments with rigidbody.AddForce in FMM (replaced with Ship controls) you can get upward propulsion that follows gravity and then you can modify the WASD controls to act more ‘helicopter’-ish.
This also provides you with a pre-established framework to re-set animations from the player model.
To get a helicopter from those player controls, you could add a throttle set to W / S and have that AddForce ( character.up , …etc.). If you google ‘banking controls unity’ you can see that you can parent a gameobject and add quick banking. You can also add rotational forces with with Torque and connect it to A / D or Q / E or whatever and get a proto-helicopter.