- Home /
Help with Android Joysticks
Hi All:
I have created a prefab that is the Camera Relative Control with an animated character mesh in place of the capsule. The parent prefab is situated at (0,0,0). I have a spawn point that is an empty gameobject which I copy its position to place the character, camera and the joysticks in a pre-determined location:
private GameObject _pc;
void Start(){
GameObject go = GameObject.Find(GameSettings.PLAYER_SPAWN_POINT);
_pc = Instantiate( playerCharacter, go.transform.position, Quaternion.identity ) as GameObject;
//_pc = Instantiate( playerCharacter, Vector3.zero, Quaternion.identity ) as GameObject;
_playerSpawnPos = new Vector3(24.73139f, 2.511604f, 162.178f);
_pc.transform.position = _playerSpawnPos;
}
As you can see in the code block above I have attempted several approaches. When I comment out that last line, effectively leaving the instantiated prefab where it is created, (0, 0, 0), I see the joystick controllers. However, leaving that line in, which re-positions my character to a predetermined point the joysticks disappear from the camera view. Another subtle change would be to move the PLAYER_SPAWN_POINT to (0, 0, 0), instantiate the prefab, and then move it to a _playerSpawnPos. Again, same result. The joysticks disappear.
If any of you have any guidance on what I'm missing it would be most appreciated!
Cheers!
Jim
Your answer
![](https://koobas.hobune.stream/wayback/20220613092144im_/https://answers.unity.com/themes/thub/images/avi.jpg)