Jump to content


Photo

YoYo_GetTilt


  • Please log in to reply
7 replies to this topic

#1 howabout

howabout

    GMC Member

  • GMC Member
  • 147 posts

Posted 13 March 2012 - 04:31 PM

When I try to use YoYo_GetTiltX or Y Or Z In any form, it returns nothing. Why is this? I am using an ipod 3g 8 gigabytes(So basicly a 2g because the 8gb ipod 3g doesnt have the 3g processer :@) And yeah.
  • 0

#2 Cakefish

Cakefish

    I Shot The Sheriff

  • GMC Member
  • 1468 posts
  • Version:GM:Studio

Posted 13 March 2012 - 04:50 PM

I would also like to know how to use these commands.

What is it meant to return? How do you implement this into a game? Can you detect how far the device has been tilted?

So would:

if YoYo_GetTiltY()=1
vspeed=+=0.1
work?

Or is it:

if YoYo_GetTiltY()=45
vspeed=+=0.1
where it measures by the degree of tilt of the device?

Edited by Cakefish, 13 March 2012 - 04:51 PM.

  • 0

#3 howabout

howabout

    GMC Member

  • GMC Member
  • 147 posts

Posted 13 March 2012 - 04:52 PM

No idea! I have tried setting the variable i made called TILT to the YoYo_GetTiltX And it returns 0. I have tried every possible thing i could think of ...
  • 0

#4 howabout

howabout

    GMC Member

  • GMC Member
  • 147 posts

Posted 15 March 2012 - 12:21 AM

Hello? I would really like to get this figured out...
  • 0

#5 name

name

    GMC Member

  • GMC Member
  • 1427 posts

Posted 15 March 2012 - 12:31 AM

On android, YoYo_GetTiltX/Y/Z() all return between -1 and 1, depending on how the device is tilted.

This means use > or < rather than = something.

Try "if YoYo_GetTiltX() > 0.5" or "if YoYo_GetTiltX() < -0.5"

If nothing is working, try putting "draw_text(0,0,YoYo_GetTiltX());" in a draw event to make sure there isn't a glitch in GMS or your ipod is broken.

Edited by name, 15 March 2012 - 12:36 AM.

  • 0

#6 howabout

howabout

    GMC Member

  • GMC Member
  • 147 posts

Posted 15 March 2012 - 12:36 AM

Oh. Does this mean that ios doesnt return anything?
Oh... Ive tried what you suggested with drawing the value. My ipod might be broken as it returns nothing... But other apps that use the accelerometer work...

Edited by howabout, 15 March 2012 - 12:37 AM.

  • 0

#7 name

name

    GMC Member

  • GMC Member
  • 1427 posts

Posted 15 March 2012 - 12:41 AM

Oh. Does this mean that ios doesnt return anything?
Oh... Ive tried what you suggested with drawing the value. My ipod might be broken as it returns nothing... But other apps that use the accelerometer work...


If that's the case, it might be a problem with GMS.
Let's hope someone from YoYo sees this.
...or is there a bugtracker site for GMS yet? If so, you could submit it there.
  • 0

#8 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 22051 posts
  • Version:GM:Studio

Posted 15 March 2012 - 01:00 AM

Yep, the usual bugtracker is now open to Studio stuff :

http://bugs.yoyogames.com/
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users