I am hoping to learn from others experiences here. I am trying to make a game that has my character constantly moving forward and he will occasionally come by enemies. What is the best way to handle a weapon for the character and how it collides with the enemy?
Should I make the weapon follow the player constantly and literally do a swing motion when the player hits the attack button? I also tried having a invisible rectangle in front of the player, and when the “Attack” button is pressed then when something collides with the invisible rectangle the enemy is destroyed. Issue with this is if the player hits “attack” while an enemy is already collided with the invisible rectangle, the “began” phase of collision has already occured. so that doesnt work out.
Just wanting to know how others have handled this, or any thoughts or opinions, thanks! [import]uid: 19620 topic_id: 21706 reply_id: 321706[/import]
[import]uid: 52491 topic_id: 21706 reply_id: 86131[/import]