Good Afternoon,
I’ve been doign some research on this matter, where for tehmoment i had to go with rigidbody and hardscript the player movement instead of using CharacterController and CharacterMotor, but i would prefer to use these as i already had these setup for pc pretty much with custom made animation scripts on pressing a Key…being that i wanted to have something like this but i dotn have experience in android input
GUITexture guiTex;
//Being that i have more than 1 touch on screen would i need
// tomake a for where it would pass an i and still do
//the if including the GetKey in case of standalone PC??
If(guiTex.HitTest(Input.GetTouch().position) || Input.GetKeyDown(KeyCode.S))
if(Input.GetTouch().phase==TouchPhase.Began)
{
//sphagetti
}
Since for the GetKeyDown ill be having the FPSInput Controller script as well, how could i adapt teh touch to this (custom script part)?
float move = Input.GetAxis ("Horizontal");
if (move > 0 && !facingRight)
Flip ();
else if (move < 0 && facingRight) {
move = -move;
Flip ();
}
if (Input.GetKeyDown (KeyCode.S) && !isJumping) {
cmotor.inputJump=Input.GetButton ("Jump");
isJumping=true;
action = AnimationState.jump;
}
As i tried passing bool value like cmotor.inputJump=true on a touch event like that but didn’t work, please i really need some help
Thanks in advance