Hi, this is a simple beginner steps request.
I'm programming in flash, AS3. I have a little star (5 pointed) that has two rockets taped onto the left and right "arm" fins of the star shape.
What would be the logical steps to take to make it work the following way:
I press key 1, and the left thruster thrusts. Key 2 for the right one.
The idea is to make it work like you would expect; if you hold only one thruster down, it would tip over. If I use both at the same time, it would go straight up.
Should I be using joints and applying force/impulse to those?
Or should I apply force/impulse to the star body itself but offset the point it applies at depending on which thruster I use? If the latter, I'm not sure how it would work after you've actually rotated the body a bit.
I'm really just starting out and have no good idea on how to apply force even. Is force or impulse the best choice? My guess is force, but then I wouldn't know when to apply it. Should I do that in the ENTER_FRAME event or something that is constantly updating?
I'm programming in flash, AS3. I have a little star (5 pointed) that has two rockets taped onto the left and right "arm" fins of the star shape.
What would be the logical steps to take to make it work the following way:
I press key 1, and the left thruster thrusts. Key 2 for the right one.
The idea is to make it work like you would expect; if you hold only one thruster down, it would tip over. If I use both at the same time, it would go straight up.
Should I be using joints and applying force/impulse to those?
Or should I apply force/impulse to the star body itself but offset the point it applies at depending on which thruster I use? If the latter, I'm not sure how it would work after you've actually rotated the body a bit.
I'm really just starting out and have no good idea on how to apply force even. Is force or impulse the best choice? My guess is force, but then I wouldn't know when to apply it. Should I do that in the ENTER_FRAME event or something that is constantly updating?