How to move left and right by tilting your phone left and right

How would I do that?

Comments

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2014

    Hi @http_gamesalad you'd make use of the gyroscope. (Not me, haha) also called the accelerometer.

    Here's a tutorial (quite old now but should still be relevant) showing use of the accelerometer in GSC.

  • http_gamesaladhttp_gamesalad Member Posts: 1,340

    @gyroscope‌ I see what you did there.. The thing is , is that why do we have to use self.postion.acceleromterY and not self.postion.acceleromterX? I never understood that... Cause the x axis goes left and right and the Y axis goes up and down

  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,598
    edited November 2014

    I've never understood that either... I guess it's because you're "pulling" the x axis down, the same for y, "pulling" it left and right....

    Edit: the video below seems to use the x and y coords as you would think, so....

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Here is another tutorial if you want to check it out. Its very similar but offers more responsive controls in my opinion. Both work fine though.

Sign In or Register to comment.