A "shoot" button that can shoot forward when tapped but shoot a direction when swiped.

owen_dennisowen_dennis Just a guy, you know.Member, PRO Posts: 236

So I'm making an R-Type style game and there's a gameplay option I'm interested in pursuing. It's like an arcade style button where if you tap it it shoots a bullet from you ship. However, since we're using touch screens, I think it would be fun to make it so that if you tap the button it shoots forward, but if you start the tap within the button and release it outside of the button it will shoot in the angle you've swiped.

I'm not really sure how to do this. I feel like it's something to do with when you release the button. Like if you release it outside the button it's checking that angle and spawning the bullet (which I know has something to do with the vectorangle attibute but I don't fully understand it), but if you release inside the button it will just shoot to the right.

Does anyone have any ideas on this?

Sign In or Register to comment.