Shake device to make scene reset or action take place

Thunder_ChildThunder_Child Member Posts: 2,343
edited June 2015 in Working with GS (Mac)

I searched and found only a couple threads. One with a video that is "not found".

I also found a thread with a code snippet in it and did everything like it shows including the self Shake check and it doesn't do anything.

Any sure fire ways to detect a pretty good Shake and then Change an attribute and then even if device is tilted a bit to NOT detect it as a Shake.

I don't mean throw on the ground Shake :-)

I mean like Shaking a container of tic tac like Shake.

Comments

  • jay2dxjay2dx Member Posts: 611

    Hmm, maybe have an off screen actor that is walled in at all sides, now have the actor movable with some rules In place ie, accelerometer x/y is **** actor moves and hits the walls, when the actor hits more than say, 3 walls connectivity through triggering a world attribute this can trigger a screen shake!

    This is basically like a tilt mechanics on a pinball machine!!

    Just thinking creatively out loud but that should work :)

  • Thunder_ChildThunder_Child Member Posts: 2,343
    edited June 2015

    Hmmmm. That's actually the most polar opposite I would have expected to hear...and the most effective solution I ha e been able to search for and find. I'll try that tonight. Thanks @jay2dx

    I fact that's very similar in idea to a tic tac bouncing around in a container ! BRILLIANT!!

  • jay2dxjay2dx Member Posts: 611

    No worries let me know how it works out, out of interest I may put a project file together to test this also as I could use this too actually for my physics based puzzle bobble game

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    edited June 2015

    Measuring the velocity might be a more solid way as just random movement could cause collides. You could also measure the velocity of the device using the accelerometer.

  • Thunder_ChildThunder_Child Member Posts: 2,343
    edited June 2015

    @The_Gamesalad_Guru said:
    Measuring the velocity might be a more solid way as just random movement could cause collides. You could also measure the velocity of the device using the accelerometer.

    Like...

    When ANY attribute ACCELEROMETER > 30
    When ANY attribute ACCELEROMETER <-30

    Work?

    Sucks I have to ad hoc this constantly so far. Like 1 last work around.

  • tmanntmann Member Posts: 278

    @jay2dx love your in the box out of the box thinking, will also give great visual feedback for fine tuning.

  • Thunder_ChildThunder_Child Member Posts: 2,343

    Hmmm. Not working yet. :-(

  • tmanntmann Member Posts: 278

    Codemonkey's example http://forums.gamesalad.com/discussion/1202/shaking-your-phone works for me in the viewer on an iPhone6 its a bit forceful so might need a bit of tuning for a more tic tacish response :)

  • Thunder_ChildThunder_Child Member Posts: 2,343
    edited July 2015

    @tmann said:
    Codemonkey's example http://forums.gamesalad.com/discussion/1202/shaking-your-phone works for me in the viewer on an iPhone6 its a bit forceful so might need a bit of tuning for a more tic tacish response

    Excellent this is a good example of what I was looking for. Thanks

Sign In or Register to comment.