- Home /
Question by
Jeeva3m · Dec 10, 2015 at 12:27 PM ·
touchrotateevent triggering
Touch Rotation is not working on Every Frame at PointerDown??
Hi friends,
I'm developing an android app with touch buttons using PointerDown. I have 2 buttons. And calling the following functions in their EventTrigger - PointerDown
public void LRotate()
{
Debug.Log ("Left");
target.transform.eulerAngles += new Vector3(0, 0.5f, 0);
}
public void RRotate()
{
Debug.Log ("Right");
target.transform.eulerAngles += new Vector3(0, -0.5f, 0);
}
During runtime, when the button is pressed down, It calls only one time. Not rotating continuously till the button is up. How to do this?
Thanks
Comment
Answer by Jeeva3m · Dec 11, 2015 at 05:59 AM
I've done something partial as below:
void Update () {
if (boolLeft) {
target.transform.eulerAngles += new Vector3(0, 1.5f, 0);
}
if (boolRight) {
target.transform.eulerAngles += new Vector3(0, -1.5f, 0);
}
//target.transform.eulerAngles += new Vector3(0, 0.5f, 0);
}
public void LRotateDown(bool leftBool)
{
boolLeft = leftBool;
Debug.Log ("Left Down");
//target.transform.eulerAngles += new Vector3(0, 0.5f, 0);
}
public void LRotateUp(bool leftBool)
{
boolLeft = leftBool;
Debug.Log ("Left Up");
//target.transform.eulerAngles += new Vector3(0, 0.5f, 0);
}
Works fine on editor but not working properly at .apk file. Need your help
Your answer

Follow this Question
Related Questions
rotate object to touch position 1 Answer
Cannot get GUIUtility.RotateAroundPivot working 1 Answer
Remove Y-axis clamp from Tap to Move, Drag to Look Script 0 Answers
Rotating Joystick on Touch 0 Answers