- Home /
Strange GUITexture Bug??
**Ok, so i have a function to move my player up which works fine...Well sort of. I have 2 version of code, 1 for my touch screen HTC and the other is for the PC - just for quick testing instead of going thru the build process.
So the thing is the PC version of the code works fine, but the mobile version doesnt, i mean i know it detects when the button is pressed because it prints out "UP.y = 1" to the GUITexture on my HTC but it just doesn't move up. Whats the dealio my good friends?
Thank you
P.s. I have other touch screen buttons created the same way for walking and they work fine.**
function Update() {
transform.Translate( movement2 * Time.deltaTime);
}
//::::::::::::::::::::::::::::: E N A B L E M O V E - U P ::::::::::::::::::::::::::::::::::
function MoveUp() {
// TOUCH SCREEN MOBILE VERSION
if(UP_Button.position.y == 1 && !LadderT.onTop){
onscreentext.text = "UP.y = 1";
ClimbingUp = true;
movement2 = Vector3(0, 1, 0) * moveSpeed;
}else{
ClimbingUp = false;
}
// PC VERSION
if(Input.GetKey("up") && !LadderT.onTop){
onscreentext.text = "UP.y = 1";
ClimbingUp = true;
movement2 = Vector3(0, 1, 0) * moveSpeed;
}else{
ClimbingUp = false;
movement2.y = 0;
}
}
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Your answer
Follow this Question
Related Questions
Shoot when GUI is pressed? 0 Answers
android and ios - phantom UGUI Button click when loading new scene w/ finger already down 1 Answer
Button Navigation none - not working with touchscreen 0 Answers
My dialogue system has a strange bug 0 Answers
why doesn't my touch-position conditional statements work for mobile app? 0 Answers