Joystick won't move
Ultric
Member Posts: 3
Hey, I'm having a bit of trouble here and it's confusing.
I've been using CodeMonkey's example for joystick controls and have been trying to apply it to a platformer. However, after the first or second use of any joystick, they seem to get stuck. They work if you drag from the center over to the edge of the base, but they don't seem to want to move otherwise. After doing some experimenting, I found that it is somehow related to gravity being on. Obviously, gravity is needed for the rest of the game, so I can't really remove that. Any ideas on what I should do?
THINGS TRIED:
Setting stick to unmovable.
Setting stick density to 0.
Making the stick accelerate and move up against gravity.
I've been using CodeMonkey's example for joystick controls and have been trying to apply it to a platformer. However, after the first or second use of any joystick, they seem to get stuck. They work if you drag from the center over to the edge of the base, but they don't seem to want to move otherwise. After doing some experimenting, I found that it is somehow related to gravity being on. Obviously, gravity is needed for the rest of the game, so I can't really remove that. Any ideas on what I should do?
THINGS TRIED:
Setting stick to unmovable.
Setting stick density to 0.
Making the stick accelerate and move up against gravity.
Comments
I've uploaded the game now: http://gamesalad.com/game/play/28896
Usually, I have to go off the edges of the base in order for it to react. Either that or I have to just drag from the center over to an edge.
I did a few tests using display text and found that, despite it's stubbornness, the sticks are turning SnapTo off when you click on them.
I used your code exactly and only renamed a few variables so I could use them more easily.