Need help trying to find pitch angle for the following expression.

bajashbajash Member, PRO Posts: 215
edited March 2012 in Working with GS (Mac)
Hello All,
My app works with Pitch and I am trying to write my code to convert my angle° to the Pitch. I know that 1° = .21 pitch. Please let me know if you can help . Thank you for reading.

prec((atan(game.Accelerometer.X)+45),1)

Comments

  • POMPOM Member Posts: 2,599
    edited March 2012

    I know that 1° = .21 pitch.
    What do you mean?

    Photobucket Roy
  • bajashbajash Member, PRO Posts: 215
    Hi P.O.M.

    1° in angle = .21° pitch angle
  • POMPOM Member Posts: 2,599
    edited March 2012
    Sorry mate but I'm afraid i don't understand what you ask for .. maybe if you be a bit more informative..
    If what you want is to "convert my angle° to the Pitch" , so simply make
    Constrain "game.pitch" TO "self.rotation*0.21

    But I'm not sure if thats what you want ;)

    Photobucket Roy
  • bajashbajash Member, PRO Posts: 215
    Hi,
    P-O-M,

    Sorry I should have explained this a little better. The code I currently have tried is a "display text behavior"

    prec((atan(game.Accelerometer.X)+45),1)

    I will try your advice above.
    Thanks, I will let you know in this thread if I have a solution or more questions.

  • bajashbajash Member, PRO Posts: 215
    Got my answer
    1° in angle = 4.5° pitch angle.

    Now I need numbers to stop being jumpy.
Sign In or Register to comment.