- Home /
How to display Swipe Marks on iPhone
When a user swipes the touch screen I want to leave a fading trail behind where they touched. i thought about using line render or trail render, however these are in 3D space and I can't see how to easily translate these into the a 2D GUI unaffected by camera movement. Suggestions please..
Answer by Adam Rademacher · Nov 12, 2010 at 05:15 PM
You could try having a second camera which is set to orthographic and culls all layers except 'swipetrail' or something along those lines. Then cull the swipetrails out of your main camera and set your ortho camera to a higher depth. Then you can use a trail-renderer to get the desired effect.
Alternatively, you could have the trail-renderer set one of its axis to a constant and use the touch position to set the other two axis. I'm not sure on the set up you're using, but you'd probably parent them to the camera and then keep their z-depth just in front of the camera and get the x/y position from touch positions.
The second camera idea is a cunning plan, it might just work, thanks.
sounds interesting! did it work? any code left to share? thnx!
Your answer
Follow this Question
Related Questions
How can I swipe function that lets the player select buttons? 0 Answers
GUI texture touch to input 1 Answer
iPhone - How to calculate a decent touch swipe speed? 2 Answers
Touch GUI texture to toogle animation 0 Answers
iPhone Touch Screen? 2 Answers