I am trying to create a sprayer like effect when user touches the screen.
The user has the option of choosing a color, so the effect should be with the user’s color choice.
How to implement that spray effect?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’d just use the common draw part on the canvas… then specify a radius to be drawn to. Then using the ‘random’ function, draw (x) number of dots inside the area of the circle you defined using the radius for as long as the user is pressing down. If you need more exact help please let me know.
[Edit]
This is going to be very pseudo-code. But you should very easily be able to make your code work from this.
[Edit 2]
If you’re going to use this, I would highly consider incorporating Iain_b’s way of doing this. Please take his post into consideration.
[Edit 3]
Here’s an image… maybe this will help you to understand…
[Edit 4]
Here’s my code updated with lain_b’s added part to help simplify it.