@vipasane said:
The_Gamesalad_Guru
Yes that is a bummer. Are you stating also that euler angles and quaternions since of the 2D nature of GS?
No what i mean is the accelerometer only gives output of the velocity at which a device is being turned in a direction. It's not a locked in thing like the gyroscope which gives feedback on the angle of orientation.
I tried using the accelerometer for my game and well I find it jumps around alot even when the phone is left sitting still on the table.
It's probably only good for checking condition for accelerating since it's jumping around accelerating over time missing a few calls you don't really notice the jumping around of the values.
But if you want to use accelerometer directly...the object that's being controlled will shake around and twitches.
I wonder if there's a way to use math to stabilize the jumping values so that when you use it the stabilized values so it doesn't jump unless you actually changed the tilt.
I am not sure if i am even explaining it right...if you want to know what i mean, just create an empty project and print out values of accelerometer and you'll see that the values will jump around all the time...not sitting still in one place. ever.
But if you want to use accelerometer directly...the object that's being controlled will shake around and twitches.
I don't know about that, it might be the behaviors you created. I used the accelerometer in my demo above and used that exact same method in a labyrinth style game and it worked out great. You can control the ball very smoothly and there is no jumpiness or weirdness to it at all, I was actually pleasantly surprised.
@jamie_c said:
I don't know about that, it might be the behaviors you created. I used the accelerometer in my demo above and used that exact same method in a labyrinth style game and it worked out great. You can control the ball very smoothly and there is no jumpiness or weirdness to it at all, I was actually pleasantly surprised.
You can just create an empty project and print out accelerometer and see the values jump around... maybe yours work because it's over time and averaged it out okay. But for real the values do twitch around.
To see the value really jump around, either print out the values, or move an actor's position based on accelerometer instead of accelerate...accelerate happens over time so it hides this twitching effect.
I am looking into how to stabilize this value (looking into using averages) for now and see if that helps
@jamie_c thanks that is helpful for someone who hasnt used accelerometer before.
I have made few games with accelerometers and now I was trying to put myself out from my comfort zone have realized it is too much.
With euler angles and quaternions I could do this, just cant figure out proper formula to calculate out tilting angles on each axis.
And yes I was lazy in trigonometry during high school.
Comments
You can download this free template over at GSHelper. It may be a good start
Like Balls? Then click here! We've 100 coming soon
Accelerometer is a tricky little bugger. Wish we had access to the gyroscope.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@The_Gamesalad_Guru
Yes that is a bummer. Are you stating also that euler angles and quaternions since of the 2D nature of GS?
I have an accelerometer tutorial linked below, it's not specifically about steering control, but you might find it helpful.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
No what i mean is the accelerometer only gives output of the velocity at which a device is being turned in a direction. It's not a locked in thing like the gyroscope which gives feedback on the angle of orientation.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I tried using the accelerometer for my game and well I find it jumps around alot even when the phone is left sitting still on the table.
It's probably only good for checking condition for accelerating since it's jumping around accelerating over time missing a few calls you don't really notice the jumping around of the values.
But if you want to use accelerometer directly...the object that's being controlled will shake around and twitches.
I wonder if there's a way to use math to stabilize the jumping values so that when you use it the stabilized values so it doesn't jump unless you actually changed the tilt.
I am not sure if i am even explaining it right...if you want to know what i mean, just create an empty project and print out values of accelerometer and you'll see that the values will jump around all the time...not sitting still in one place. ever.
I don't know about that, it might be the behaviors you created. I used the accelerometer in my demo above and used that exact same method in a labyrinth style game and it worked out great. You can control the ball very smoothly and there is no jumpiness or weirdness to it at all, I was actually pleasantly surprised.
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
You can just create an empty project and print out accelerometer and see the values jump around... maybe yours work because it's over time and averaged it out okay. But for real the values do twitch around.
To see the value really jump around, either print out the values, or move an actor's position based on accelerometer instead of accelerate...accelerate happens over time so it hides this twitching effect.
I am looking into how to stabilize this value (looking into using averages) for now and see if that helps
Found solution to this with Low Pass Filter mentioned here:
forums.gamesalad.com/discussion/53471/accelerometer-movement-done-right/p1
@jamie_c thanks that is helpful for someone who hasnt used accelerometer before.
I have made few games with accelerometers and now I was trying to put myself out from my comfort zone have realized it is too much.
With euler angles and quaternions I could do this, just cant figure out proper formula to calculate out tilting angles on each axis.
And yes I was lazy in trigonometry during high school.