|
I'm touching the touch screen and a prefab is instantiated where I have placed my finger. Now, keeping my finger on the screen, I begin to swipe. A prefab's clone is instantiated every say 10 pixels. The result would be something like a dotted line along the swipe path. How do I do this?
(comments are locked)
|
|
I'd do this by testing the touch position against the position of the last prefab and if it meets the threshhold - then create a new prefab. Here is some untested C# code (my syntax checking isn't nearly as good as a compilers):
(comments are locked)
|

Do you want it set up that you get x number of prefabs spread out per swipe, or you want one every x distance for the entire swipe?
The 2nd. A longer swipe will spawn more prefabs.
did you ever get a solution to this?