I'm in a bit of a pickle getting the mechanics of my game together and I'm in need of some expert help.
All enemies in the game will be made up of 2 objects; the main body, and the arm that holds the weapon. This is because the arm rotates so that the enemy may aim at the player. The problem is, I don't know how to go about making the arm move with the main body.
I know how it would be done if there was only one enemy, but there are several.
The only solution I could come up with is to assign every main body object to an arm object (or vice-versa), and then set it so that the arm's coordinates are always the same as it's "parent" body. I have no idea how this would be accomplished, however.
Any help would be greatly appreciated.
All enemies in the game will be made up of 2 objects; the main body, and the arm that holds the weapon. This is because the arm rotates so that the enemy may aim at the player. The problem is, I don't know how to go about making the arm move with the main body.
I know how it would be done if there was only one enemy, but there are several.
The only solution I could come up with is to assign every main body object to an arm object (or vice-versa), and then set it so that the arm's coordinates are always the same as it's "parent" body. I have no idea how this would be accomplished, however.
Any help would be greatly appreciated.