1
NGUI 3 Support / [Input Manager] how do you allocate a NGUI button to Unity Input Manager?
« on: July 28, 2014, 11:42:02 PM »
Hello,
New to Unity here, Im currently trying to adjust a script i purchased and was hoping someone can help me out here.
The current script contains "InputGetAxis" where if you press up or down it moves the car forward and backwards.
***************************************************************************************************************
void FixedUpdate()
{
if (!Enabled)
return;
#region UserInput
float vertical = Input.GetAxis("Vertical"); //Forward & Backward drive input
float horizontal = Input.GetAxis("Horizontal"); //Angular velocity control input
float space = Input.GetAxis("Jump"); //break control input
#endregion
if (vertical > 0)
CurrentEngineAcceleration = Acceleration * vertical;
else CurrentEngineAcceleration = (Acceleration * vertical) * BackwardAccelerationFactor;
*****************************************************************************************************************
What i would like to know is, how do you go about allocating an NGUI button to the work as Input Manager "Vertical" can you do this or no?
Thanks for the help if you can
New to Unity here, Im currently trying to adjust a script i purchased and was hoping someone can help me out here.
The current script contains "InputGetAxis" where if you press up or down it moves the car forward and backwards.
***************************************************************************************************************
void FixedUpdate()
{
if (!Enabled)
return;
#region UserInput
float vertical = Input.GetAxis("Vertical"); //Forward & Backward drive input
float horizontal = Input.GetAxis("Horizontal"); //Angular velocity control input
float space = Input.GetAxis("Jump"); //break control input
#endregion
if (vertical > 0)
CurrentEngineAcceleration = Acceleration * vertical;
else CurrentEngineAcceleration = (Acceleration * vertical) * BackwardAccelerationFactor;
*****************************************************************************************************************
What i would like to know is, how do you go about allocating an NGUI button to the work as Input Manager "Vertical" can you do this or no?
Thanks for the help if you can
