- Home /
On screen movement control?
i want to be able to have like some gui buttons on screen saying left,right,forward,backward. so when the player presses them the character moves.help me please?
Comment
Have you made an attempt? Have you read the documentation? Have you tried tutorials? Have you searched for questions on similar topics?
Answer by TheDarkVoid · Jul 29, 2011 at 05:04 PM
you can use a script like this
function OnGUI()
{
if(GUILayout.Button("Forward")
{
//forward Controls here
}
if(GUILayout.Button("Backward")
{
//backward Controls here
}
if(GUILayout.Button("Left")
{
//left Controls here
}
if(GUILayout.Button("Right")
{
//right Controls here
}
}
you can improve upon this if you like.