Power Control by touch position
Hi GS'ers
Iam making a game where i need to control my power/powermeter (much like cannon demo) But a whole different concept.
In the Cannon demo power is based how long time touch is pressed.
How do i make it so power = touch position?
I hope i make my self understandeble
Iam making a game where i need to control my power/powermeter (much like cannon demo) But a whole different concept.
In the Cannon demo power is based how long time touch is pressed.
How do i make it so power = touch position?
I hope i make my self understandeble
Comments
Could you be a bit more specific!
So let's pretend your canon point is X=100 and y=200 and you want to know how far away your touch is from that point.
Create an attribute (real) game.magnitude
Rule when touch is pressed
constrain game.magnitude to magnitude(game.touch.1.X-100,game.touch.1.y-200)
Now you can use this anyway you want.