Forum Xamarin.iOS

How can I Implement acceleration iOS

tadrianotadriano USMember

How can I implement acceleration iOS with cocosSharp ? I'M trying this code below:

follow a link to my code on dropbox:

            var acc = new CCEventListenerAccelerometer ();
    acc.IsEnabled = true; //  inputManager.setAccelerometerEnabled(true);

    acc.OnAccelerate = (e) => {
        // HOW TO INTERPRET e.Acceleration.X / Y / Z
        paddleSprite.PositionX = (float)e.Acceleration.X;


Sign In or Register to comment.