- Home /
Can I control an axis with a script or is there an axis substitute?
Hi,
This may seem an odd question but hear me out and please tell me if Im not descriptive enough.
I would Like an axis that can be controlled in script and not by input. I want this because of how axis' progressively move from 0 to 1 or -1 over a period of a second or so when you press the button. This is what I am after to control the animation speed of an AI character. Is this possible and if so how do I do it? Or is there something else I can do that I don't know about?
Thanks for all the help!
Answer by WillTAtl · Nov 01, 2011 at 05:00 PM
Currently no way to do this explicitly using InputManager - I've looked extensively, wondering if on-screen joysticks could be mapped to axes, and found nothing.
Mathf.SmoothDamp lets you do the same kind of smoothing yourself, though.
Hope this helps!
Thanks, thats perfect, it can be scripted so when GUI controls are used the variable is changed with smoothdamp!
Your answer
Follow this Question
Related Questions
How to make camera position relative to a specific target. 1 Answer
Banking an object in relation to its turn 1 Answer
Ctrl key + hor/ver axis ? 0 Answers
Velocity relative to Local Axis 1 Answer
force too -z ax 1 Answer