Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#Actualtom_mai78101

Posted 25 February 2014 - 08:32 AM


Chances are you don't need an angle at all. What are you planning to do with it? Perhaps we can suggest alternatives.

 

 

Using two fingers on an Android touch screen, the movement based on these two fingers determines the rotation angle the camera is facing. Two fingers swiped from left to right will cause the camera to pan in a circle towards the camera's right side view. The rotation angle, once converted to degrees, is needed in order to rotate the view matrix used in OpenGL ES 2.0. On Android, in order to rotate view matrix, I need to pass the view matrix into the first parameter of the

Matrix.rotateM(float[] matrix, int offset, float angle, float x, float y, float z);

method. After that, passing the view matrix as an uniform matrix in the vertex shader is the last thing I need to do.

 

This is what I'm trying to do.

 

If you ask why I didn't go with 1 finger, it's because it's already used to aim at the enemies with a cross in the center.


#2tom_mai78101

Posted 25 February 2014 - 08:30 AM


Chances are you don't need an angle at all. What are you planning to do with it? Perhaps we can suggest alternatives.

 

 

Using two fingers on an Android touch screen, the movement based on these two fingers determines the rotation angle the camera is facing. Two fingers swiped from left to right will cause the camera to pan in a circle towards the camera's right side view. The rotation angle, once converted to degrees, is needed in order to rotate the view matrix used in OpenGL ES 2.0. On Android, in order to rotate view matrix, I need to pass the view matrix into the first parameter of the

Matrix.rotateM(float[] matrix, int offset, float angle, float x, float y, float z);

method. After that, passing the view matrix as an uniform matrix in the vertex shader is the last thing I need to do.

 

This is what I'm trying to do.


#1tom_mai78101

Posted 25 February 2014 - 08:29 AM


Chances are you don't need an angle at all. What are you planning to do with it? Perhaps we can suggest alternatives.

 

 

Using two fingers on an Android touch screen, the movement based on these two fingers determines the rotation angle the camera is facing. Two fingers swiped from left to right will cause the camera to pan in a circle towards the camera's right side view. The rotation angle, once converted to degrees, is needed in order to rotate the view matrix used in OpenGL ES 2.0. On Android, in order to rotate view matrix, I need to pass the view matrix as a parameter into a

Matrix.rotateM()

method. After that, passing the view matrix as an uniform matrix in the vertex shader is the last thing I need to do.

 

This is what I'm trying to do.


PARTNERS