Child GUI controls to character controller

Hi,

I have a character controller that happily walks around the scene controlled by two GUI joystick and some buttons, I was going to make the character controller a prefab so what I did was to drop the GUI controls onto the the character controller to make them children of the character controller, but now when I move the GUI controls disappear off screen, why? do I need to clamp them to the screen? or something else?

Thanks.

1 Answer

1

create an empty game obeject and attach the gui joystick script to it, then make it a prefab, like that you don’t have to worry about positions
PS ;
you may need to use GetComponent

Closed because tbkn gave me the right direction to go [Here][1] [1]: http://answers.unity3d.com/questions/596817/gui-texture-child-of-camera.html