Tilt control (Please help Ive made an animation to show you what i am trying to do)
I have tried to incoperate tilt control into my game
My game involves shaking the iphone to start my bike , then rub the screen to gain speed with my bike then jump as far as I can
What I wanted to do is make it so when I'm in the air after jumping off the ramp , I can control the bikes angle by tilting my iPhone
i want to achieve this so bad that i have made an animation , showing you what i want to accomplish, so everyone knows what i mean
My game involves shaking the iphone to start my bike , then rub the screen to gain speed with my bike then jump as far as I can
What I wanted to do is make it so when I'm in the air after jumping off the ramp , I can control the bikes angle by tilting my iPhone
i want to achieve this so bad that i have made an animation , showing you what i want to accomplish, so everyone knows what i mean
Comments
Cause my bike is suppose to jot move until I shake my screen then rub my screen
But when I activate the tilt control , it just starts my bike moving, without me shaking or running the screen
www.youtube.com/watch?v=5DEqQZXTL8g
That's what happens
Would that help? It's my template on perfect tilt controls.... (there's also a Youtube link for you to watch how it works)
You often ignore suggestions and just add more details or more questions. I know you've made huge progress with GameSalad but I gave you a specific thing to try for a specific reason. I think maybe you didn't understand the reason. I work from an IT troubleshooting standpoint and then from a programming standpoint. So I like to isolate problems.
You're saying that when you hold the phone level, the actor moves. So my question is/was, when the phone is level, what is the value of the accelerometer attribute you're using? And furthermore, what is the rule condition you're using for that attribute?
Because what if you think that the attribute should be 0 but it's really -418? Or what if it's 0 and your rule condition is When attribute [attributeName] > 90? I have no idea unless you post your exact rules and the values of the attributes you're getting when your phone is in each position.
Honestly, a video doesn't help at all. Showing me what the actor does when the phone is tilted a certain way doesn't give me any additional information.
Edit: I got thrown off by you typing "running the screen" when I realize you meant "rubbing the screen." So it sounds like you need to take a close look at the conditions you have in place for when your bike moves.
Can I assume there's nothing hidden in the "else" section of those rules?
here is a video showing you the numbers displayed
you see it move foward at the end
When you hold your phone level (in landscape mode without rotating left or right), like in this screenshot...
....what is the value of game.Accelerometer.X? When you rotate it to the left 45°, what is the value of game.Accelerometer.X? When you rotate it to the right 45°, what is the value of game.Accelerometer.X?
From the video, it appears that your phone is showing game.Accelerometer.X at about 0.8 when the phone is level (assuming it's level... I can't tell from a video). So if that's the case, you'll need to adjust your rules.
If you are assuming that 0 is level, 0.5 is rotated right, and -0.5 is rotated left, you're basing that on the idea that 0 is the midpoint of the range. In your case, it looks like 0.8 is the midpoint of the range, so you'd need a condition -0.5 less than that and a condition 0.5 greater than that.
rotated 45° left its between 0.01-0.04
and straight its about 1
do these numbers help ?
45° left 0.02 straight 1 45° right 0.03
Do you see a problem? Maybe try game.Accelerometer.Y.
ive highlighted the parts i dont know if to change
http://forums.gamesalad.com/discussion/53471
i was wondering if im using the wrong self.motion , cause my bike is supose to rotate to balance the bike i am wondering if it would be better to use
self.motion.angularvelocity ?