Hi!
As my first iPhone project I’m making a 2d (of course) tank game. I’ve set up all the iOS-specific stuff and they work fine so that’s why I’m posting here and not specifically in the iOS part of the forum.
I’m having trouble creating a robust steering solution. The user controls the movement with one joystick and the rotation of the turret with the other. I’ve setup so that two dummy objects move away (max a couple of units) from the tanks as the joysticks move away from the center. This was to decouple the movement solution from the joystick input.
What I’d like to do is create some kind of “blackbox” solution where the tank always knows how to move and I just specify where it’s supposed to move. I’d also like the turret to stay rotated in relation to the tank so that if the turret is rotated 25 degrees in relation to the tank and I turn the tank, it should still be rotated 25 degrees in relation to the tank.
Any suggestions?