Accelerometer.. Right / Left / STRAIGHT???

SaveDaveSaveDave Member Posts: 140
edited November -1 in Working with GS (Mac)
I have a ball that moves left and right dependent on the tilt of the device. This is controlled by using the < and > 0 to decide if it goes left or right.

How can i also have an option for it to settle in the middle rather than continuing its movement to the opposite side. I do however NOT want the ball to come to a sudden stop but rather slowly decelerate.

Ive tried a few methods, none that i think up seem to work well though.

any help would be great.

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you could try to make a type of buffer zone by doing something like Less than -5 and greater than 5. I havnt used accelerometer much so I don't know but thats where I would start
  • creativeappscreativeapps Member Posts: 1,770
    i have same question please some one can give proper answer.
  • wroachbarrettewroachbarrette Member Posts: 101
    well hears the best way, there are a few demos you can search on the gamesalad opening sean they all show demos on the type of acceleration your looking for
  • creativeappscreativeapps Member Posts: 1,770
    I am waiting for your video. Please update asap.
  • creativeappscreativeapps Member Posts: 1,770
    tshirtbooth will you please upload that video? I am really want see that.
  • creativeappscreativeapps Member Posts: 1,770
    tshirtbooth 2 days gone i am waiting for your video please upload
  • creativeappscreativeapps Member Posts: 1,770
    i am doing full time job and when I came home I am very much excited to see your this video with the voice.
    "Hello guys tshirtbooth here"
  • creativeappscreativeapps Member Posts: 1,770
    tshirtbooth its almost 3 days and I am waiting for your video. Will you please upload it today?
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    creativeapps said:
    tshirtbooth its almost 3 days and I am waiting for your video. Will you please upload it today?

    give him a break. If its a cookbook video which it probably is hes not in charge of the uploading. He makes them and send to gamesalad

    to make the ball slown down instead of coming to a complete stop

    when accelerometer y is < 0.1, and accelerometer y is > -0.1

    interpolate self motion linear x or y to 0.

    Thats for landscape mode
  • creativeappscreativeapps Member Posts: 1,770
    ok thanks for your reply. But you know what its really great experience to watching tshirtbooth video and learning from that.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    creativeapps said:
    ok thanks for your reply. But you know what its really great experience to watching tshirtbooth video and learning from that.

    yes his videos are awesome, and i love his voice, i get a smile everytime i hear hey everybody tshirtbooth here. hehehe
  • SlickZeroSlickZero Houston, TexasMember, Sous Chef Posts: 2,870
    I like his sign off -

    "And that's all you need to know, aboot........in Gamesalad"
  • creativeappscreativeapps Member Posts: 1,770
    yes I am agree with you. i think he is playing very big role.
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    YUP! TSB certainly kicks some "Canadian bacon" for sure! ........except in Canada it's just called bacon ;)
  • mattyr64mattyr64 Member Posts: 82
    For one of my games, I use a rule that sets acceleration in the opposite direction to the movement, whenever the linear velocity of that direction is different to zero. This affectively means there is a sense of drag on the object, and that as you ease off tilting the device it will decelerate.
Sign In or Register to comment.