KevinnFtw 3 Report post Posted April 15, 2014 Hi, It's my first time using the Phaser.io and I must say it is great so far.I've ran into a problem, I want to create a webbased game that you can play on a mobile device using the accelerometer. What I want to do is change the angle of a sprite based on the x and y value of the accelerometer.Problem is, I don't know how to do this at all. I'm using the gyro.js library to get the tracking values. At the moment I'm using this code in my create() function to move the sprite on the screen (but it doesn't rotate accordingly):if(gyro.getFeatures().length > 0) { gyro.frequency = 10; gyro.startTracking(function(o) { player.body.velocity.x += o.x; player.body.velocity.y += o.y; });} Can anyone tell me how I could accomplish this? Quote Share this post Link to post Share on other sites
KevinnFtw 3 Report post Posted April 15, 2014 Never mind, seemed to be a caching issue. It is working now.. Quote Share this post Link to post Share on other sites
rich 2610 Report post Posted April 15, 2014 Would be interested to know how you get on with this. Quote Share this post Link to post Share on other sites
KevinnFtw 3 Report post Posted April 15, 2014 Would be interested to know how you get on with this.I'd love to keep you updated. The game is just in the beginning stage, but still got 10 weeks to develop 'something' which will hopefully be a fully working game. Quote Share this post Link to post Share on other sites