- Home /
Not much effort was given by the poster.
how first person controller can walk by touching a gui texture of arrow not by keyboard key
Question with no body (just title) should not get answered. The community is neither an answering machine, neither a coding robot.
We expect users to have tried first by themselves. We are happy to help them correct or improve their code. But don't ask us to do the work for you.
I'm closing this question for this reason.
Answer by landon912 · Aug 30, 2012 at 10:42 PM
var arrowTex:Texture;
static var forwardmovement:int;
function OnGUI(){
if(GUI.Button(Rect(0,0,25,25), arrowTex){
forwardmovement = 1.0;
}
}
Then just change the Character Controller to fit this script. ie.: Where the Input is taken(GetAxis), change that var to equal forwardmovement.
Athough the answer might not be complete, I give you a +1 vote because of your effort.
Thanks it's hard to script when you have no info, so I just try to do my best and make it universal.
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Where are First Person Controller inputs located? 1 Answer
Problem with multi touch[solved] 0 Answers
Toggle Only Works Once 1 Answer